]> git.donarmstrong.com Git - lilypond.git/blobdiff - lily/tie.cc
Issue 5167/6: Changes: show \markup xxx = ... \etc assignments
[lilypond.git] / lily / tie.cc
index 849e859eb59e1d38689b6e42daa621f75288451a..dcc53ad44e61c7af5ee5522ce3d8b18a19b56eb4 100644 (file)
@@ -45,13 +45,20 @@ bool
 Tie::less (Grob *g1, Grob *g2)
 {
   Spanner *s1 = dynamic_cast<Spanner *> (g1);
+  if (!s1)
+    {
+      g1->programming_error ("grob is not a tie");
+      return false;
+    }
+
   Spanner *s2 = dynamic_cast<Spanner *> (g2);
-  if (s1 && s2) {
-    return get_position (s1) < get_position (s2);
-  }
+  if (!s2)
+    {
+      g2->programming_error ("grob is not a tie");
+      return true;
+    }
 
-  programming_error ("grob is not a tie");
-  return false;
+  return get_position (s1) < get_position (s2);
 }
 
 void