]> git.donarmstrong.com Git - lilypond.git/blobdiff - flower/rational.cc
* Another grand 2003 update.
[lilypond.git] / flower / rational.cc
index 4c7c293e356b183e58b69db8e648fe5fc28a8808..c5019afbd5a5d1fa6563a461e024ced7df70d21c 100644 (file)
@@ -3,7 +3,7 @@
   
   source file of the Flower Library
 
-  (c)  1997--2000 Han-Wen Nienhuys <hanwen@cs.uu.nl>
+  (c)  1997--2003 Han-Wen Nienhuys <hanwen@cs.uu.nl>
 */
 #include <math.h>
 #include <stdlib.h>
@@ -21,7 +21,7 @@ Rational::operator double () const
 ostream &
 operator << (ostream &o, Rational r)
 {
-  o <<  r.str ();
+  o <<  r.string ();
   return o;
 }
 #endif
@@ -66,11 +66,13 @@ int gcd (int a, int b)
   return b;
 }
 
+#if 0
 static
 int lcm (int a, int b)
 {
   return abs (a*b / gcd (a,b));
 }
+#endif
 
 void
 Rational::set_infinite (int s)
@@ -275,16 +277,17 @@ Rational::operator -= (Rational r)
 }
 
 String
-Rational::str () const
+Rational::to_string () const
 {
   if (infty_b ())
     {
       String s (sign_ > 0 ? "" : "-" );
       return String (s + "infinity");
     }
-  String s = to_str (num ());
+
+  String s = ::to_string (num ());
   if (den () != 1 && num ())
-    s += "/" + to_str (den ());
+    s += "/" + ::to_string (den ());
   return s;
 }