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;
}
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;
}
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;
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 ()
#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);
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));
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
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 ();
}
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);
}
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 ())
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 "?";
}
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);
{
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"), "");
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");
Paper_column_engraver::finalize ()
{
if (! (breaks_ % 8))
- progress_indication ("[" + to_string (breaks_) + "]");
+ progress_indication ("[" + ::to_string (breaks_) + "]");
if (!made_columns_)
{
breaks_++;
if (! (breaks_ % 8))
- progress_indication ("[" + to_string (breaks_) + "]");
+ progress_indication ("[" + ::to_string (breaks_) + "]");
}
context ()->get_score_context ()->unset_property (ly_symbol2scm ("forbidBreak"));
{
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 () : "?/?";
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);
}
actual_style = "";
}
- return ("rests." + to_string (durlog) + (is_ledgered ? "o" : "")
+ return ("rests." + ::to_string (durlog) + (is_ledgered ? "o" : "")
+ actual_style);
}
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)
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);
}
}
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;
}
}
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);
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;
}
return numbered_time_signature (me, n, d);
if ((style == "default") || (style == ""))
- style = to_string ("C");
+ style = ::to_string ("C");
if (style == "C")
{
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);
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);
{
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;
}
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"),