]> git.donarmstrong.com Git - lilypond.git/blobdiff - flower/include/interval.hh
Merge branch 'master' of git+ssh://jneem@git.sv.gnu.org/srv/git/lilypond
[lilypond.git] / flower / include / interval.hh
index 6cc16eb6966c9a5815c671aacc011c8cf162697d..ba28b1c76c2031062a7526d7776ceeed98311066 100644 (file)
@@ -1,7 +1,7 @@
 /*
   interval.hh -- part of flowerlib
 
-  (c) 1996--2006 Han-Wen Nienhuys
+  (c) 1996--2007 Han-Wen Nienhuys
 */
 
 #ifndef INTERVAL_HH
@@ -9,8 +9,6 @@
 
 #include <math.h>
 
-#include "std-string.hh"
-
 #include "flower-proto.hh"
 #include "drul-array.hh"
 
@@ -23,7 +21,7 @@ struct Interval_t : public Drul_array<T>
   Drul_array<T>::at;
 
   static T infinity ();
-  static std::string T_to_string (T arg);
+  static string T_to_string (T arg);
   T center () const;
   void translate (T t)
   {
@@ -110,7 +108,7 @@ struct Interval_t : public Drul_array<T>
     Drul_array<Real> da (at (LEFT), at (RIGHT));
     return ::linear_combination (da, x);
   }
-  std::string to_string () const;
+  string to_string () const;
 
   bool contains (T r) const;
   void negate ()
@@ -128,9 +126,9 @@ struct Interval_t : public Drul_array<T>
     at (RIGHT) = t;
   }
 
-  static int left_comparison (Interval_t<T> const &a, Interval_t<T> const &b)
+  static bool left_less (Interval_t<T> const &a, Interval_t<T> const &b)
   {
-    return sign (a[LEFT] - b[RIGHT]);
+    return a[LEFT] < b[RIGHT];
   }
 };