diff options
author | David Kastrup <dak@gnu.org> | 2013-11-18 20:59:15 +0100 |
---|---|---|
committer | David Kastrup <dak@gnu.org> | 2013-11-20 19:09:40 +0100 |
commit | 2c633c806d4f1c760bec4a1da90e0e0011102d7a (patch) | |
tree | bd5010798a8905bbbbf7d4941553fc71a9aba83e | |
parent | 2bd665b7b90b74a4e0e838b1827da12ad646e289 (diff) |
Issue 3656/2: disambiguate our own ::to_string from std::to_string
-rw-r--r-- | flower/string-convert.cc | 24 | ||||
-rw-r--r-- | lily/arpeggio.cc | 2 | ||||
-rw-r--r-- | lily/flag.cc | 6 | ||||
-rw-r--r-- | lily/input.cc | 2 | ||||
-rw-r--r-- | lily/mensural-ligature.cc | 2 | ||||
-rw-r--r-- | lily/note-head.cc | 2 | ||||
-rw-r--r-- | lily/page-turn-page-breaking.cc | 2 | ||||
-rw-r--r-- | lily/paper-column-engraver.cc | 4 | ||||
-rw-r--r-- | lily/paper-column.cc | 2 | ||||
-rw-r--r-- | lily/performance.cc | 2 | ||||
-rw-r--r-- | lily/rest.cc | 2 | ||||
-rw-r--r-- | lily/simultaneous-music-iterator.cc | 2 | ||||
-rw-r--r-- | lily/source-file.cc | 8 | ||||
-rw-r--r-- | lily/system-start-delimiter.cc | 2 | ||||
-rw-r--r-- | lily/system.cc | 2 | ||||
-rw-r--r-- | lily/time-signature.cc | 8 | ||||
-rw-r--r-- | lily/volta-repeat-iterator.cc | 4 |
17 files changed, 38 insertions, 38 deletions
diff --git a/flower/string-convert.cc b/flower/string-convert.cc index eebcd92708..745a98ecea 100644 --- a/flower/string-convert.cc +++ b/flower/string-convert.cc @@ -37,8 +37,8 @@ string String_convert::bin2hex (Byte bin_char) { string str; - str += to_string ((char) nibble2hex_byte ((Byte) (bin_char >> 4))); - str += to_string ((char) nibble2hex_byte (bin_char++)); + str += ::to_string ((char) nibble2hex_byte ((Byte) (bin_char >> 4))); + str += ::to_string ((char) nibble2hex_byte (bin_char++)); return str; } @@ -49,8 +49,8 @@ String_convert::bin2hex (const string &bin_string) Byte const *byte = (Byte const *)bin_string.data (); for (ssize i = 0; i < bin_string.length (); i++) { - str += to_string ((char)nibble2hex_byte ((Byte) (*byte >> 4))); - str += to_string ((char)nibble2hex_byte (*byte++)); + str += ::to_string ((char)nibble2hex_byte ((Byte) (*byte >> 4))); + str += ::to_string ((char)nibble2hex_byte (*byte++)); } return str; } @@ -127,7 +127,7 @@ String_convert::hex2bin (string hex_string, string &bin_string_r) int low_i = hex2nibble (*byte++); if (high_i < 0 || low_i < 0) return 1; // invalid char - bin_string_r += to_string ((char) (high_i << 4 | low_i), 1); + bin_string_r += ::to_string ((char) (high_i << 4 | low_i), 1); i += 2; } return 0; @@ -165,10 +165,10 @@ String_convert::int2dec (int i, size_t length_i, char ch) fill_char = '0'; // ugh - string dec_string = to_string (i); + string dec_string = ::to_string (i); // ugh - return to_string (fill_char, ssize_t (length_i - dec_string.length ())) + dec_string; + return ::to_string (fill_char, ssize_t (length_i - dec_string.length ())) + dec_string; } // stupido. Should use int_string () @@ -182,14 +182,14 @@ String_convert::unsigned2hex (unsigned u, size_t length, char fill_char) #if 1 // both go... while (u) { - str = to_string ((char) ((u % 16)["0123456789abcdef"])) + str; + str = ::to_string ((char) ((u % 16)["0123456789abcdef"])) + str; u /= 16; } #else str += int_string (u, "%x"); // hmm. %lx vs. %x -> portability? #endif - str = to_string (fill_char, ssize_t (length - str.length ())) + str; + str = ::to_string (fill_char, ssize_t (length - str.length ())) + str; while ((str.length () > length) && (str[ 0 ] == 'f')) str = str.substr (2); @@ -299,7 +299,7 @@ String_convert::pointer_string (void const *l) string String_convert::precision_string (double x, int n) { - string format = "%." + to_string (max (0, n - 1)) + "e"; + string format = "%." + ::to_string (max (0, n - 1)) + "e"; string str = double_string (abs (x), format.c_str ()); int exp = dec2int (str.substr (str.length () - 3)); @@ -316,9 +316,9 @@ String_convert::precision_string (double x, int n) str = str.substr (0, 1) + str.substr (2); ssize dot = 1 + exp; if (dot <= 0) - str = "0." + to_string ('0', -dot) + str; + str = "0." + ::to_string ('0', -dot) + str; else if (dot >= str.length ()) - str += to_string ('0', dot - str.length ()); + str += ::to_string ('0', dot - str.length ()); else if ((dot > 0) && (dot < str.length ())) str = str.substr (0, dot) + "." + str.substr (dot); else diff --git a/lily/arpeggio.cc b/lily/arpeggio.cc index 018d9cd22d..4de173da06 100644 --- a/lily/arpeggio.cc +++ b/lily/arpeggio.cc @@ -163,7 +163,7 @@ Arpeggio::print (SCM smob) if (dir) { Font_metric *fm = Font_interface::get_default_font (me); - arrow = fm->find_by_name ("scripts.arpeggio.arrow." + to_string (dir)); + arrow = fm->find_by_name ("scripts.arpeggio.arrow." + ::to_string (dir)); heads[dir] -= dir * arrow.extent (Y_AXIS).length (); } diff --git a/lily/flag.cc b/lily/flag.cc index 31ddf349c9..f4fcce8e0e 100644 --- a/lily/flag.cc +++ b/lily/flag.cc @@ -105,7 +105,7 @@ Flag::glyph_name (SCM smob) char dir = (d == UP) ? 'u' : 'd'; string font_char = flag_style - + to_string (dir) + staffline_offs + to_string (log); + + ::to_string (dir) + staffline_offs + ::to_string (log); return ly_string2scm ("flags." + font_char); } @@ -143,11 +143,11 @@ Flag::print (SCM smob) string stroke_style = ly_scm2string (stroke_style_scm); if (!stroke_style.empty ()) { - string font_char = flag_style + to_string (dir) + stroke_style; + string font_char = flag_style + ::to_string (dir) + stroke_style; Stencil stroke = fm->find_by_name ("flags." + font_char); if (stroke.is_empty ()) { - font_char = to_string (dir) + stroke_style; + font_char = ::to_string (dir) + stroke_style; stroke = fm->find_by_name ("flags." + font_char); } if (stroke.is_empty ()) diff --git a/lily/input.cc b/lily/input.cc index a091ef9855..2b29c828ba 100644 --- a/lily/input.cc +++ b/lily/input.cc @@ -142,7 +142,7 @@ string Input::line_number_string () const { if (source_file_) - return to_string (source_file_->get_line (start_)); + return ::to_string (source_file_->get_line (start_)); return "?"; } diff --git a/lily/mensural-ligature.cc b/lily/mensural-ligature.cc index 3bffcb841c..4695eef986 100644 --- a/lily/mensural-ligature.cc +++ b/lily/mensural-ligature.cc @@ -168,7 +168,7 @@ internal_brew_primitive (Grob *me) duration_log--; case MLP_BREVIS: duration_log--; - suffix = to_string (duration_log) + color + suffix = ::to_string (duration_log) + color + (duration_log < -1 ? "lig" : "") + "mensural"; index = prefix + "s"; out = fm->find_by_name (index + "r" + suffix); diff --git a/lily/note-head.cc b/lily/note-head.cc index 4bf8168eb1..5d8352e72d 100644 --- a/lily/note-head.cc +++ b/lily/note-head.cc @@ -38,7 +38,7 @@ internal_print (Grob *me, string *font_char) { string style = robust_symbol2string (me->get_property ("style"), "default"); - string suffix = to_string (min (robust_scm2int (me->get_property ("duration-log"), 2), 2)); + string suffix = ::to_string (min (robust_scm2int (me->get_property ("duration-log"), 2), 2)); if (style != "default") suffix = robust_scm2string (me->get_property ("glyph-name"), ""); diff --git a/lily/page-turn-page-breaking.cc b/lily/page-turn-page-breaking.cc index 2055214c82..047ba6a82f 100644 --- a/lily/page-turn-page-breaking.cc +++ b/lily/page-turn-page-breaking.cc @@ -232,7 +232,7 @@ Page_turn_page_breaking::solve () for (vsize i = 0; i < last_break_position (); i++) { calc_subproblem (i); - progress_indication (string ("[") + to_string (i + 1) + "]"); + progress_indication (string ("[") + ::to_string (i + 1) + "]"); } progress_indication ("\n"); diff --git a/lily/paper-column-engraver.cc b/lily/paper-column-engraver.cc index cdbb2e8b00..cb39f58d1e 100644 --- a/lily/paper-column-engraver.cc +++ b/lily/paper-column-engraver.cc @@ -50,7 +50,7 @@ void Paper_column_engraver::finalize () { if (! (breaks_ % 8)) - progress_indication ("[" + to_string (breaks_) + "]"); + progress_indication ("[" + ::to_string (breaks_) + "]"); if (!made_columns_) { @@ -269,7 +269,7 @@ Paper_column_engraver::stop_translation_timestep () breaks_++; if (! (breaks_ % 8)) - progress_indication ("[" + to_string (breaks_) + "]"); + progress_indication ("[" + ::to_string (breaks_) + "]"); } context ()->get_score_context ()->unset_property (ly_symbol2scm ("forbidBreak")); diff --git a/lily/paper-column.cc b/lily/paper-column.cc index d586058fa0..4379ce1a1d 100644 --- a/lily/paper-column.cc +++ b/lily/paper-column.cc @@ -237,7 +237,7 @@ Paper_column::print (SCM p) { Paper_column *me = dynamic_cast<Paper_column *> (unsmob_grob (p)); - string r = to_string (Paper_column::get_rank (me)); + string r = ::to_string (Paper_column::get_rank (me)); Moment *mom = unsmob_moment (me->get_property ("when")); string when = mom ? mom->to_string () : "?/?"; diff --git a/lily/performance.cc b/lily/performance.cc index 4e19544d41..dfd23a871a 100644 --- a/lily/performance.cc +++ b/lily/performance.cc @@ -56,7 +56,7 @@ Performance::output (Midi_stream &midi_stream) const for (vsize i = 0; i < audio_staffs_.size (); i++) { Audio_staff *s = audio_staffs_[i]; - debug_output ("[" + to_string (i), true); + debug_output ("[" + ::to_string (i), true); s->output (midi_stream, i, ports_); debug_output ("]", false); } diff --git a/lily/rest.cc b/lily/rest.cc index c4c5de1e73..3a448546b0 100644 --- a/lily/rest.cc +++ b/lily/rest.cc @@ -217,7 +217,7 @@ Rest::glyph_name (Grob *me, int durlog, const string &style, bool try_ledgers, actual_style = ""; } - return ("rests." + to_string (durlog) + (is_ledgered ? "o" : "") + return ("rests." + ::to_string (durlog) + (is_ledgered ? "o" : "") + actual_style); } diff --git a/lily/simultaneous-music-iterator.cc b/lily/simultaneous-music-iterator.cc index 3b891e8e79..3e0ad4fae7 100644 --- a/lily/simultaneous-music-iterator.cc +++ b/lily/simultaneous-music-iterator.cc @@ -63,7 +63,7 @@ Simultaneous_music_iterator::construct_children () SCM name = ly_symbol2scm (get_outlet ()->context_name ().c_str ()); Context *c = (j && create_separate_contexts_) - ? get_outlet ()->find_create_context (name, to_string (j), SCM_EOL) + ? get_outlet ()->find_create_context (name, ::to_string (j), SCM_EOL) : get_outlet (); if (!c) diff --git a/lily/source-file.cc b/lily/source-file.cc index 26426ae8af..788c78a69e 100644 --- a/lily/source-file.cc +++ b/lily/source-file.cc @@ -181,8 +181,8 @@ Source_file::file_line_column_string (char const *context_str0) const int l, ch, col, offset; get_counts (context_str0, &l, &ch, &col, &offset); - return name_string () + ":" + to_string (l) - + ":" + to_string (col + 1); + return name_string () + ":" + ::to_string (l) + + ":" + ::to_string (col + 1); } } @@ -196,8 +196,8 @@ Source_file::quote_input (char const *pos_str0) const get_counts (pos_str0, &l, &ch, &col, &offset); string line = line_string (pos_str0); string context = line.substr (0, offset) - + to_string ('\n') - + to_string (' ', col) + + ::to_string ('\n') + + ::to_string (' ', col) + line.substr (offset, line.length () - offset); return context; } diff --git a/lily/system-start-delimiter.cc b/lily/system-start-delimiter.cc index d4b523c06c..a45b7dd13a 100644 --- a/lily/system-start-delimiter.cc +++ b/lily/system-start-delimiter.cc @@ -169,7 +169,7 @@ System_start_delimiter::staff_brace (Grob *me, Real y) } while (hi - lo > 1); - Stencil stil (fm->find_by_name ("brace" + to_string (lo))); + Stencil stil (fm->find_by_name ("brace" + ::to_string (lo))); stil.translate_axis (-b[X_AXIS].length () / 2, X_AXIS); stil.translate_axis (-0.2, X_AXIS); diff --git a/lily/system.cc b/lily/system.cc index 1ec46fbaf6..ad4d0bab77 100644 --- a/lily/system.cc +++ b/lily/system.cc @@ -223,7 +223,7 @@ System::get_paper_systems () scm_vector_set_x (lines, scm_from_int (i), system->get_paper_system ()); - debug_output (to_string (i) + "]", false); + debug_output (::to_string (i) + "]", false); } return lines; } diff --git a/lily/time-signature.cc b/lily/time-signature.cc index f00c2563f6..89f20278bf 100644 --- a/lily/time-signature.cc +++ b/lily/time-signature.cc @@ -67,7 +67,7 @@ Time_signature::special_time_signature (Grob *me, SCM scm_style, int n, int d) return numbered_time_signature (me, n, d); if ((style == "default") || (style == "")) - style = to_string ("C"); + style = ::to_string ("C"); if (style == "C") { @@ -77,7 +77,7 @@ Time_signature::special_time_signature (Grob *me, SCM scm_style, int n, int d) return numbered_time_signature (me, n, d); } - string char_name = style + to_string (n) + to_string (d); + string char_name = style + ::to_string (n) + ::to_string (d); me->set_property ("font-encoding", ly_symbol2scm ("fetaMusic")); Stencil out = Font_interface::get_default_font (me) ->find_by_name ("timesig." + char_name); @@ -100,9 +100,9 @@ Time_signature::numbered_time_signature (Grob *me, int num, int den) chain); SCM sn = Text_interface::interpret_markup (me->layout ()->self_scm (), chain, - ly_string2scm (to_string (num))); + ly_string2scm (::to_string (num))); SCM sd = Text_interface::interpret_markup (me->layout ()->self_scm (), chain, - ly_string2scm (to_string (den))); + ly_string2scm (::to_string (den))); Stencil n = *unsmob_stencil (sn); Stencil d = *unsmob_stencil (sd); diff --git a/lily/volta-repeat-iterator.cc b/lily/volta-repeat-iterator.cc index 3e6f58efda..110053686f 100644 --- a/lily/volta-repeat-iterator.cc +++ b/lily/volta-repeat-iterator.cc @@ -103,7 +103,7 @@ Volta_repeat_iterator::next_element (bool side_effect) { if (alt_count_) { - string repstr = to_string (rep_count_ - alt_count_ + done_count_) + "."; + string repstr = ::to_string (rep_count_ - alt_count_ + done_count_) + "."; if (done_count_ <= 1) { alt_restores_ = SCM_EOL; @@ -142,7 +142,7 @@ Volta_repeat_iterator::next_element (bool side_effect) } if (done_count_ == 1 && alt_count_ < rep_count_) - repstr = "1.--" + to_string (rep_count_ - alt_count_ + done_count_) + "."; + repstr = "1.--" + ::to_string (rep_count_ - alt_count_ + done_count_) + "."; if (done_count_ <= alt_count_) add_repeat_command (scm_list_n (ly_symbol2scm ("volta"), |