]> git.donarmstrong.com Git - lilypond.git/blobdiff - flower/rational.cc
Merge with git+ssh://jneem@git.sv.gnu.org/srv/git/lilypond.git
[lilypond.git] / flower / rational.cc
index 5bcf7b39609396fe56908822e8190d209c12db31..a0c0d22410e235726eeee037b760fee1f7dcaef9 100644 (file)
@@ -3,13 +3,14 @@
 
   source file of the Flower Library
 
-  (c) 1997--2005 Han-Wen Nienhuys <hanwen@cs.uu.nl>
+  (c) 1997--2006 Han-Wen Nienhuys <hanwen@xs4all.nl>
 */
 
 #include "rational.hh"
 
 #include <cmath>
 #include <cstdlib>
+using namespace std;
 
 #include "string-convert.hh"
 #include "libc-extension.hh"
@@ -268,16 +269,16 @@ Rational::operator -= (Rational r)
   return (*this += r);
 }
 
-String
+string
 Rational::to_string () const
 {
   if (is_infinity ())
     {
-      String s (sign_ > 0 ? "" : "-");
-      return String (s + "infinity");
+      string s (sign_ > 0 ? "" : "-");
+      return string (s + "infinity");
     }
 
-  String s = ::to_string (num ());
+  string s = ::to_string (num ());
   if (den () != 1 && num ())
     s += "/" + ::to_string (den ());
   return s;
@@ -286,7 +287,7 @@ Rational::to_string () const
 int
 Rational::to_int () const
 {
-  return num () / den ();
+  return (int) num () / den ();
 }
 
 int