]> git.donarmstrong.com Git - lilypond.git/blobdiff - lily/binary-source-file.cc
* flower/*.cc: remove <? and >?
[lilypond.git] / lily / binary-source-file.cc
index 3b5affd6c2d02f97e3edc0a69cb29792b5520544..b1a78b16dc47ae48b18dc20ea352503eeb9ecdc0 100644 (file)
@@ -27,17 +27,19 @@ Binary_source_file::error_string (char const *pos_str0) const
   if (!contains (pos_str0))
     return "";
 
-  char const *begin_str0 = pos_str0 - 8 >? to_str0 ();
-  char const *end_str0 = pos_str0 + 7 <? to_str0 () + length ();
+  char const *begin_str0 = max (pos_str0 - 8, to_str0 ());
+  char const *end_str0 = min (pos_str0 + 7, to_str0 () + length ());
 
   String pre_string ((Byte const *)begin_str0, pos_str0 - begin_str0);
   pre_string = String_convert::bin2hex (pre_string);
   for (int i = 2; i < pre_string.length (); i += 3)
-    pre_string = pre_string.left_string (i) + " " + pre_string.cut_string (i, INT_MAX);
+    pre_string = pre_string.left_string (i)
+      + " " + pre_string.cut_string (i, INT_MAX);
   String post_string ((Byte const *)pos_str0, end_str0 - pos_str0);
   post_string = String_convert::bin2hex (post_string);
   for (int i = 2; i < post_string.length (); i += 3)
-    post_string = post_string.left_string (i) + " " + post_string.cut_string (i, INT_MAX);
+    post_string = post_string.left_string (i)
+      + " " + post_string.cut_string (i, INT_MAX);
 
   String str = pre_string
     + to_string ('\n')