]> git.donarmstrong.com Git - lilypond.git/blobdiff - flower/string-convert.cc
Issue 4550 (2/2) Avoid "using namespace std;" in included files
[lilypond.git] / flower / string-convert.cc
index 13788a4a846fbaf22d1547682ec488c1be56df52..cbbde1e9d677d75aab6223a095ee0d5a2d77c0c7 100644 (file)
@@ -8,7 +8,6 @@
 
 #include <cstring>
 #include <cstdio>
-using namespace std;
 
 #include "libc-extension.hh"
 #include "rational.hh"
@@ -299,7 +298,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 (std::max (0, n - 1)) + "e";
   string str = double_string (abs (x), format.c_str ());
 
   int exp = dec2int (str.substr (str.length () - 3));
@@ -354,7 +353,7 @@ String_convert::unsigned_long_string (unsigned long ul)
 string
 String_convert::pad_to (const string &s, size_t n)
 {
-  return s + string (max (int (n - s.length ()), 0), ' ');
+  return s + string (std::max (int (n - s.length ()), 0), ' ');
 }
 
 string