]> git.donarmstrong.com Git - lilypond.git/commitdiff
Issue 3656/2: disambiguate our own ::to_string from std::to_string
authorDavid Kastrup <dak@gnu.org>
Mon, 18 Nov 2013 19:59:15 +0000 (20:59 +0100)
committerDavid Kastrup <dak@gnu.org>
Wed, 20 Nov 2013 18:09:40 +0000 (19:09 +0100)
17 files changed:
flower/string-convert.cc
lily/arpeggio.cc
lily/flag.cc
lily/input.cc
lily/mensural-ligature.cc
lily/note-head.cc
lily/page-turn-page-breaking.cc
lily/paper-column-engraver.cc
lily/paper-column.cc
lily/performance.cc
lily/rest.cc
lily/simultaneous-music-iterator.cc
lily/source-file.cc
lily/system-start-delimiter.cc
lily/system.cc
lily/time-signature.cc
lily/volta-repeat-iterator.cc

index eebcd92708076919e17f874ddab85e8b28474270..745a98ecea6a28bec022316114991f6153eca513 100644 (file)
@@ -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
index 018d9cd22df116282bbaff4ef63d62355ebeb195..4de173da061b38b32d4c7652291ad3c290cd5514 100644 (file)
@@ -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 ();
     }
 
index 31ddf349c92cf1098836fa98b11252ea19cf2b00..f4fcce8e0e96a8db468846208a8ab193ec7952b8 100644 (file)
@@ -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 ())
index a091ef9855c72111c069d77d4931599bc3df9e83..2b29c828bac6f18d80b151445d014b83578dc51f 100644 (file)
@@ -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 "?";
 }
 
index 3bffcb841c87f205f7b9fbd6127c42240ba2ede4..4695eef98683831400df09c3a337368ea12266f9 100644 (file)
@@ -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);
index 4bf8168eb1092c4fe34b147bbfc5d17e318774fa..5d8352e72df32240749dcaa3d0f80dda8d16e6df 100644 (file)
@@ -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"), "");
 
index 2055214c8262e5c093f01cab74646b4b2f944e34..047ba6a82fee8fedf396505ebf3ea62a992795d7 100644 (file)
@@ -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");
 
index cdbb2e8b004ba5435f800baf781bc081306f3888..cb39f58d1e2d7e48c473e9f4519b5f62ed36e6e8 100644 (file)
@@ -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"));
index d586058fa0cbb2c0c58aa9fda9b727423ad704aa..4379ce1a1d1228c8288485eb95c3b18fd1041f9f 100644 (file)
@@ -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 () : "?/?";
index 4e19544d41823b6e21a5e0003d0a6616641a4745..dfd23a871af1080ce57e8b4d9b862c6745c4d7f3 100644 (file)
@@ -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);
     }
index c4c5de1e73a19f5e1cadc839f2d7f70d0a63efc4..3a448546b05f74b034436da5a6df1d905062eb4d 100644 (file)
@@ -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);
 }
 
index 3b891e8e79f1e978f6ab82ded8ff45f9e37a4bb2..3e0ad4fae72cc504185da470df43bc4c8b2c9ff3 100644 (file)
@@ -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)
index 26426ae8af1e80824e2626f41c1ff1449e134d99..788c78a69ee6239795b5026fbf8cb37c1995e522 100644 (file)
@@ -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;
 }
index d4b523c06c63b82094346bc1d13d08af83ae4a4a..a45b7dd13a6c0fd87936da38584331e1f73cda87 100644 (file)
@@ -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);
index 1ec46fbaf655c342d3e9a6e20faae3df9f352c0f..ad4d0bab772453f4007edd23b6519c429eed347e 100644 (file)
@@ -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;
 }
index f00c2563f6fe4f71922577e5f0d4963ad41c2547..89f20278bfbe35290e836e61a851e2af1313c772 100644 (file)
@@ -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);
index 3e6f58efda470ed86866d0873282a51604cc6d03..110053686fd2ed6bb4479eca653567e237a9cae6 100644 (file)
@@ -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"),