CVSROOT:        /cvsroot/lilypond
Module name:    lilypond
Branch:         
Changes by:     Han-Wen Nienhuys <[EMAIL PROTECTED]>    05/05/04 10:35:56

Modified files:
        .              : ChangeLog 
        lily           : rest-collision.cc scm-hash.cc 
                         side-position-interface.cc simple-spacer.cc 
                         skyline.cc slur-configuration.cc 
                         slur-scoring.cc slur.cc span-bar.cc 
                         staff-spacing.cc stem-tremolo.cc stem.cc 
                         system-start-delimiter.cc tfm.cc 
                         tuplet-engraver.cc 

Log message:
        

CVSWeb URLs:
http://savannah.gnu.org/cgi-bin/viewcvs/lilypond/lilypond/ChangeLog.diff?tr1=1.3549&tr2=1.3550&r1=text&r2=text
http://savannah.gnu.org/cgi-bin/viewcvs/lilypond/lilypond/lily/rest-collision.cc.diff?tr1=1.113&tr2=1.114&r1=text&r2=text
http://savannah.gnu.org/cgi-bin/viewcvs/lilypond/lilypond/lily/scm-hash.cc.diff?tr1=1.44&tr2=1.45&r1=text&r2=text
http://savannah.gnu.org/cgi-bin/viewcvs/lilypond/lilypond/lily/side-position-interface.cc.diff?tr1=1.94&tr2=1.95&r1=text&r2=text
http://savannah.gnu.org/cgi-bin/viewcvs/lilypond/lilypond/lily/simple-spacer.cc.diff?tr1=1.81&tr2=1.82&r1=text&r2=text
http://savannah.gnu.org/cgi-bin/viewcvs/lilypond/lilypond/lily/skyline.cc.diff?tr1=1.13&tr2=1.14&r1=text&r2=text
http://savannah.gnu.org/cgi-bin/viewcvs/lilypond/lilypond/lily/slur-configuration.cc.diff?tr1=1.14&tr2=1.15&r1=text&r2=text
http://savannah.gnu.org/cgi-bin/viewcvs/lilypond/lilypond/lily/slur-scoring.cc.diff?tr1=1.49&tr2=1.50&r1=text&r2=text
http://savannah.gnu.org/cgi-bin/viewcvs/lilypond/lilypond/lily/slur.cc.diff?tr1=1.214&tr2=1.215&r1=text&r2=text
http://savannah.gnu.org/cgi-bin/viewcvs/lilypond/lilypond/lily/span-bar.cc.diff?tr1=1.102&tr2=1.103&r1=text&r2=text
http://savannah.gnu.org/cgi-bin/viewcvs/lilypond/lilypond/lily/staff-spacing.cc.diff?tr1=1.45&tr2=1.46&r1=text&r2=text
http://savannah.gnu.org/cgi-bin/viewcvs/lilypond/lilypond/lily/stem-tremolo.cc.diff?tr1=1.87&tr2=1.88&r1=text&r2=text
http://savannah.gnu.org/cgi-bin/viewcvs/lilypond/lilypond/lily/stem.cc.diff?tr1=1.271&tr2=1.272&r1=text&r2=text
http://savannah.gnu.org/cgi-bin/viewcvs/lilypond/lilypond/lily/system-start-delimiter.cc.diff?tr1=1.92&tr2=1.93&r1=text&r2=text
http://savannah.gnu.org/cgi-bin/viewcvs/lilypond/lilypond/lily/tfm.cc.diff?tr1=1.49&tr2=1.50&r1=text&r2=text
http://savannah.gnu.org/cgi-bin/viewcvs/lilypond/lilypond/lily/tuplet-engraver.cc.diff?tr1=1.71&tr2=1.72&r1=text&r2=text

Patches:
Index: lilypond/ChangeLog
diff -u lilypond/ChangeLog:1.3549 lilypond/ChangeLog:1.3550
--- lilypond/ChangeLog:1.3549   Wed May  4 10:11:32 2005
+++ lilypond/ChangeLog  Wed May  4 10:35:55 2005
@@ -1,5 +1,7 @@
 2005-05-04  Han-Wen Nienhuys  <[EMAIL PROTECTED]>
 
+       * lily/*.cc: more <? >? to min/max changes
+
        * lily/include/interpretation-context-handle.hh: rename
        Interpretation_context_handle to Context_handle.
 
Index: lilypond/lily/rest-collision.cc
diff -u lilypond/lily/rest-collision.cc:1.113 
lilypond/lily/rest-collision.cc:1.114
--- lilypond/lily/rest-collision.cc:1.113       Tue Apr 19 21:33:20 2005
+++ lilypond/lily/rest-collision.cc     Wed May  4 10:35:55 2005
@@ -26,8 +26,8 @@
 Rest_collision::force_shift_callback (SCM element_smob, SCM axis)
 {
   Grob *them = unsmob_grob (element_smob);
-  Axis a = (Axis) scm_to_int (axis);
-  assert (a == Y_AXIS);
+  (void) axis;
+  assert (scm_to_int (axis) == Y_AXIS);
 
   if (Note_column::has_rests (them))
     {
@@ -234,7 +234,7 @@
        }
 
       Real dist
-       = minimum_dist + dir * (notedim[dir] - restdim[-dir]) >? 0;
+       = minimum_dist + dir * max (notedim[dir] - restdim[-dir], 0.0);
 
       int stafflines = Staff_symbol_referencer::line_count (me);
       if (!stafflines)
Index: lilypond/lily/scm-hash.cc
diff -u lilypond/lily/scm-hash.cc:1.44 lilypond/lily/scm-hash.cc:1.45
--- lilypond/lily/scm-hash.cc:1.44      Wed Mar 16 19:19:15 2005
+++ lilypond/lily/scm-hash.cc   Wed May  4 10:35:56 2005
@@ -9,9 +9,12 @@
 #include "scm-hash.hh"
 
 #include <cstdio>
+#include <algorithm>
 
 #include "ly-smobs.icc"
 
+using namespace std; 
+
 /*
   Return: number of objects.
 */
@@ -43,7 +46,7 @@
   elt_count_ = 0;
   smobify_self ();
 
-  hash_tab_ = scm_make_vector (scm_int2num (src.elt_count_ >? 11), SCM_EOL);
+  hash_tab_ = scm_make_vector (scm_int2num (max ((int) src.elt_count_, 11)), 
SCM_EOL);
   elt_count_ = copy_scm_hashes (hash_tab_, src.hash_tab_);
 }
 
@@ -53,7 +56,7 @@
   if (&src == this)
     return;
 
-  hash_tab_ = scm_make_vector (scm_int2num (src.elt_count_ >? 11), SCM_EOL);
+  hash_tab_ = scm_make_vector (scm_int2num (max ((int) src.elt_count_, 11)), 
SCM_EOL);
   elt_count_ = copy_scm_hashes (hash_tab_, src.hash_tab_);
 }
 
Index: lilypond/lily/side-position-interface.cc
diff -u lilypond/lily/side-position-interface.cc:1.94 
lilypond/lily/side-position-interface.cc:1.95
--- lilypond/lily/side-position-interface.cc:1.94       Tue Apr 12 22:49:27 2005
+++ lilypond/lily/side-position-interface.cc    Wed May  4 10:35:56 2005
@@ -9,6 +9,8 @@
 #include "side-position-interface.hh"
 
 #include <math.h>              // ceil.
+#include <algorithm>
+
 
 #include "note-head.hh"
 #include "warn.hh"
@@ -20,6 +22,8 @@
 #include "staff-symbol-referencer.hh"
 #include "string-convert.hh"
 
+using namespace std;
+
 void
 Side_position_interface::add_support (Grob *me, Grob *e)
 {
@@ -226,7 +230,7 @@
 
       Interval staff_size = st->extent (common, Y_AXIS);
       Real diff = d*staff_size[d] + padding - d * (o + iv[-d]);
-      o += (d * (diff >? 0));
+      o += d * max (diff, 0.0);
     }
 
   return scm_make_real (o);
Index: lilypond/lily/simple-spacer.cc
diff -u lilypond/lily/simple-spacer.cc:1.81 lilypond/lily/simple-spacer.cc:1.82
--- lilypond/lily/simple-spacer.cc:1.81 Tue Apr 19 17:32:02 2005
+++ lilypond/lily/simple-spacer.cc      Wed May  4 10:35:56 2005
@@ -100,11 +100,10 @@
   Real block_stretch = dist - d;
 
   Real block_force = c * block_stretch;
-  force_ = force_ >? block_force;
+  force_ = max (force_, block_force);
 
   for (int i = l; i < r; i++)
-    springs_[i].block_force_ = block_force >?
-      springs_[i].block_force_;
+    springs_[i].block_force_ = max (block_force, springs_[i].block_force_);
 }
 
 Real
@@ -136,7 +135,7 @@
   for (int i = 0; i < springs_.size (); i++)
     if (springs_[i].is_active_)
       {
-       bf = bf >? springs_[i].block_force_;
+       bf = max (bf, springs_[i].block_force_);
       }
   return bf;
 }
@@ -222,7 +221,7 @@
 
   while (is_active ())
     {
-      force_ = active_blocking_force () >? 0.0;
+      force_ = max (active_blocking_force (), 0.0);
       Real conf = configuration_length ();
 
       if (conf < line_len_)
Index: lilypond/lily/skyline.cc
diff -u lilypond/lily/skyline.cc:1.13 lilypond/lily/skyline.cc:1.14
--- lilypond/lily/skyline.cc:1.13       Wed Mar 16 19:19:15 2005
+++ lilypond/lily/skyline.cc    Wed May  4 10:35:56 2005
@@ -155,7 +155,7 @@
       w.intersect (clouds[j].width_);
 
       if (!w.is_empty ())
-       distance = distance >? (buildings[i].height_ - clouds[j].height_);
+       distance = max (distance, (buildings[i].height_ - clouds[j].height_));
 
       if (i > 0 && buildings[i].width_[LEFT] >= clouds[j].width_[LEFT])
        {
Index: lilypond/lily/slur-configuration.cc
diff -u lilypond/lily/slur-configuration.cc:1.14 
lilypond/lily/slur-configuration.cc:1.15
--- lilypond/lily/slur-configuration.cc:1.14    Tue Apr 12 22:49:27 2005
+++ lilypond/lily/slur-configuration.cc Wed May  4 10:35:56 2005
@@ -88,7 +88,7 @@
       Real y = curve.get_other_coordinate (X_AXIS, p[X_AXIS]);
       if (y)
        {
-         fit_factor = fit_factor >? (p[Y_AXIS] / y);
+         fit_factor = max (fit_factor, (p[Y_AXIS] / y));
        }
     }
   return fit_factor;
@@ -108,7 +108,7 @@
        continue;
 
       Encompass_info inf (state.get_encompass_info (encompasses[i]));
-      Real y = state.dir_ * ((state.dir_ * inf.head_) >? (state.dir_ * 
inf.stem_));
+      Real y = state.dir_ * (max (state.dir_ * inf.head_, state.dir_ * 
inf.stem_));
 
       avoid.push (Offset (inf.x_, y + state.dir_ * 
state.parameters_.free_head_distance_));
     }
@@ -151,7 +151,7 @@
   (control3 - control0).  */
 
   Real max_indent = len / 3.1;
-  indent = indent <? max_indent;
+  indent = min (indent, max_indent);
 
   Real a1 = sqr (len) / 3.0;
   Real a2 = 0.75 * sqr (indent + len / 3.0);
@@ -182,7 +182,7 @@
 
   Real ff = fit_factor (dz_unit, dz_perp, curve, state.dir_, avoid);
 
-  height = height >? ((height * ff) <? max_h);
+  height = max (height, min (height * ff, max_h));
 
   curve.control_[0] = attachment_[LEFT];
   curve.control_[1] = attachment_[LEFT] + dz_perp * height * state.dir_
@@ -238,7 +238,7 @@
              Real hd = (head_dy)
                ? (1 / fabs (head_dy) - 1 / 
state.parameters_.free_head_distance_)
                : state.parameters_.head_encompass_penalty_;
-             hd = (hd >? 0)<? state.parameters_.head_encompass_penalty_;
+             hd = min (max (hd, 0.0), 
state.parameters_.head_encompass_penalty_);
 
              demerit += hd;
            }
@@ -253,8 +253,7 @@
            {
 
              Real closest
-               = state.dir_ * (state.dir_ * 
state.encompass_infos_[j].get_point (state.dir_)
-                               >? state.dir_ * line_y);
+               = state.dir_ * max (state.dir_ * 
state.encompass_infos_[j].get_point (state.dir_), state.dir_ * line_y);
              Real d = fabs (closest - y);
 
              convex_head_distances.push (d);
@@ -279,8 +278,7 @@
          // ?
          demerit += -state.parameters_.closeness_factor_
            * (state.dir_
-              * (y - (ext[state.dir_] + state.dir_ * 
state.parameters_.free_head_distance_))
-              <? 0)
+              * min (y - (ext[state.dir_] + state.dir_ * 
state.parameters_.free_head_distance_), 0.0))
            / state.encompass_infos_.size ();
        }
     }
@@ -293,7 +291,7 @@
       Real min_dist = infinity_f;
       for (int j = 0; j < convex_head_distances.size (); j++)
        {
-         min_dist = min_dist <? convex_head_distances[j];
+         min_dist = min (min_dist, convex_head_distances[j]);
          avg_distance += convex_head_distances[j];
        }
 
@@ -317,10 +315,9 @@
       variance_penalty = state.parameters_.head_slur_distance_max_ratio_;
       if (min_dist > 0.0)
        variance_penalty
-         = (avg_distance / (min_dist + 
state.parameters_.absolute_closeness_measure_) - 1.0)
-         <? variance_penalty;
+         = min ((avg_distance / (min_dist + 
state.parameters_.absolute_closeness_measure_) - 1.0),  variance_penalty);
 
-      variance_penalty = variance_penalty >? 0.0;
+      variance_penalty = max (variance_penalty, 0.0);
       variance_penalty *= state.parameters_.head_slur_distance_factor_;
     }
 
@@ -382,7 +379,7 @@
 
       Real dist = state.extra_encompass_infos_[j].extents_[Y_AXIS].distance 
(y);
       demerit
-       += fabs (0 >? (state.parameters_.extra_encompass_free_distance_ - dist))
+       += fabs (max (0.0, (state.parameters_.extra_encompass_free_distance_ - 
dist)))
        / state.parameters_.extra_encompass_free_distance_
        * state.extra_encompass_infos_[j].penalty_;
     }
@@ -430,8 +427,8 @@
   Real slur_dy = slur_dz[Y_AXIS];
   Real demerit = 0.0;
 
-  demerit += ((fabs (slur_dy / slur_dz[X_AXIS])
-              - state.parameters_.max_slope_) >? 0)
+  demerit += max ((fabs (slur_dy / slur_dz[X_AXIS])
+                  - state.parameters_.max_slope_), 0.0)
     * state.parameters_.max_slope_factor_;
 
   /* 0.2: account for staffline offset. */
@@ -441,10 +438,10 @@
 
   if (!state.is_broken_)
     demerit += state.parameters_.steeper_slope_factor_
-      * ((fabs (slur_dy) -max_dy) >? 0);
+      * (max (fabs (slur_dy) -max_dy, >? 0.0));
 
-  demerit += ((fabs (slur_dy / slur_dz[X_AXIS])
-              - state.parameters_.max_slope_) >? 0)
+  demerit += max ((fabs (slur_dy / slur_dz[X_AXIS])
+                  - state.parameters_.max_slope_), 0.0)
     * state.parameters_.max_slope_factor_;
 
   if (sign (dy) == 0
Index: lilypond/lily/slur-scoring.cc
diff -u lilypond/lily/slur-scoring.cc:1.49 lilypond/lily/slur-scoring.cc:1.50
--- lilypond/lily/slur-scoring.cc:1.49  Wed Apr 20 10:52:20 2005
+++ lilypond/lily/slur-scoring.cc       Wed May  4 10:35:56 2005
@@ -469,10 +469,9 @@
       if (extremes_[d].note_column_)
        {
          end_ys[d] = dir_
-           * ((dir_ * (base_attachments_[d][Y_AXIS] + parameters_.region_size_ 
* dir_))
-              >? (dir_ * (dir_ + extremes_[d].note_column_->extent 
(common_[Y_AXIS],
-                                                                    
Y_AXIS)[dir_]))
-              >? (dir_ * base_attachments_[-d][Y_AXIS]));
+           * max (max (dir_ * (base_attachments_[d][Y_AXIS] + 
parameters_.region_size_ * dir_),
+                       dir_ * (dir_ + extremes_[d].note_column_->extent 
(common_[Y_AXIS], Y_AXIS)[dir_])),
+                  dir_ * base_attachments_[-d][Y_AXIS]);
        }
       else
        end_ys[d] = base_attachments_[d][Y_AXIS] + parameters_.region_size_ * 
dir_;
Index: lilypond/lily/slur.cc
diff -u lilypond/lily/slur.cc:1.214 lilypond/lily/slur.cc:1.215
--- lilypond/lily/slur.cc:1.214 Fri Apr  8 18:34:41 2005
+++ lilypond/lily/slur.cc       Wed May  4 10:35:56 2005
@@ -130,6 +130,7 @@
 {
   Grob *script = unsmob_grob (grob);
   Axis a = Axis (scm_to_int (axis));
+  (void) a; 
   assert (a == Y_AXIS);
 
   Grob *slur = unsmob_grob (script->get_property ("slur"));
@@ -187,8 +188,8 @@
       Direction dir = get_grob_direction (script);
       for (int d = LEFT; d <= RIGHT; d++)
        {
-         offset = dir * (dir * offset >? dir
-                         * (ys[k] - yext[-dir] + dir * slur_padding));
+         offset = dir * (max (dir * offset,
+                              dir * (ys[k] - yext[-dir] + dir * 
slur_padding)));
          k++;
        }
     }
Index: lilypond/lily/span-bar.cc
diff -u lilypond/lily/span-bar.cc:1.102 lilypond/lily/span-bar.cc:1.103
--- lilypond/lily/span-bar.cc:1.102     Thu Mar 31 13:09:52 2005
+++ lilypond/lily/span-bar.cc   Wed May  4 10:35:56 2005
@@ -114,8 +114,9 @@
 Span_bar::width_callback (SCM element_smob, SCM scm_axis)
 {
   Grob *se = unsmob_grob (element_smob);
-  Axis a = (Axis) scm_to_int (scm_axis);
-  assert (a == X_AXIS);
+  (void) scm_axis;
+
+  assert ( (Axis) scm_to_int (scm_axis) == X_AXIS);
   String gl = ly_scm2string (se->get_property ("glyph"));
 
   /*
@@ -146,8 +147,8 @@
 Span_bar::center_on_spanned_callback (SCM element_smob, SCM axis)
 {
   Grob *me = unsmob_grob (element_smob);
-  Axis a = (Axis) scm_to_int (axis);
-  assert (a == Y_AXIS);
+  (void) axis;
+  assert (scm_to_int (axis) == Y_AXIS);
   Interval i (get_spanned_interval (me));
 
   /* Bar_line::print delivers a barline of y-extent (-h/2, h/2), so
Index: lilypond/lily/staff-spacing.cc
diff -u lilypond/lily/staff-spacing.cc:1.45 lilypond/lily/staff-spacing.cc:1.46
--- lilypond/lily/staff-spacing.cc:1.45 Tue Apr 12 22:49:27 2005
+++ lilypond/lily/staff-spacing.cc      Wed May  4 10:35:56 2005
@@ -32,7 +32,7 @@
     return 0.0;
 
   Item *col = dynamic_cast<Item *> (g)->get_column ();
-  Real max_corr = 0. >? (- g->extent (col, X_AXIS)[LEFT]);
+  Real max_corr = max (0., (- g->extent (col, X_AXIS)[LEFT]));
 
   /*
     Duh. If this gets out of hand, we should invent something more generic.
@@ -47,11 +47,11 @@
       else
        v = a->extent (col, X_AXIS);
 
-      max_corr = max_corr >? (- v[LEFT]);
+      max_corr = max (max_corr, (- v[LEFT]));
     }
   if (Grob *a = unsmob_grob (g->get_property ("arpeggio")))
     {
-      max_corr = max_corr >? (- a->extent (col, X_AXIS)[LEFT]);
+      max_corr = max (max_corr, - a->extent (col, X_AXIS)[LEFT]);
     }
 
   /*
@@ -69,18 +69,18 @@
          {
            Real stem_start = Stem::head_positions (stem) [DOWN];
            Real stem_end = Stem::stem_end_position (stem);
-           Interval stem_posns (stem_start <? stem_end,
-                                stem_end >? stem_start);
+           Interval stem_posns (min (stem_start, stem_end),
+                                max (stem_end, stem_start));
 
            stem_posns.intersect (bar_size);
 
-           Real corr = abs (stem_posns.length () / 7.) <? 1.0;
+           Real corr = min (abs (stem_posns.length () / 7.0), 1.0);
            corr
              *= robust_scm2double (me->get_property 
("stem-spacing-correction"), 1);
 
            if (d != DOWN)
              corr = 0.0;
-           max_corr = max_corr >? corr;
+           max_corr = max (max_corr, corr);
          }
       }
   return max_corr;
@@ -128,10 +128,10 @@
     {
       Grob *g = unsmob_grob (scm_car (s));
 
-      max_corr = max_corr >? next_note_correction (me, g, bar_size);
+      max_corr = max (max_corr, next_note_correction (me, g, bar_size));
       for (SCM t = g->get_property ("elements");
           scm_is_pair (t); t = scm_cdr (t))
-       max_corr = max_corr >? next_note_correction (me, unsmob_grob (scm_car 
(t)), bar_size);
+       max_corr = max (max_corr, next_note_correction (me, unsmob_grob 
(scm_car (t)), bar_size));
     }
 
   return max_corr;
@@ -223,11 +223,11 @@
     }
   else if (type == ly_symbol2scm ("minimum-space"))
     {
-      *space = last_ext[LEFT] + (last_ext.length () >? distance);
+      *space = last_ext[LEFT] + max (last_ext.length (), distance);
     }
   else if (type == ly_symbol2scm ("minimum-fixed-space"))
     {
-      *space = last_ext[LEFT] + (last_ext.length () >? distance);
+      *space = last_ext[LEFT] + max (last_ext.length (), distance);
       *fixed = *space;
     }
 
Index: lilypond/lily/stem-tremolo.cc
diff -u lilypond/lily/stem-tremolo.cc:1.87 lilypond/lily/stem-tremolo.cc:1.88
--- lilypond/lily/stem-tremolo.cc:1.87  Tue Apr 12 22:49:27 2005
+++ lilypond/lily/stem-tremolo.cc       Wed May  4 10:35:56 2005
@@ -144,7 +144,7 @@
   Real end_y
     = Stem::stem_end_position (stem) * ss / 2
     - stemdir * (beam_count * beamthickness
-                + ((beam_count -1) >? 0) * beam_translation);
+                + (max (beam_count -1, 0) * beam_translation));
 
   /* FIXME: the 0.33 ss is to compensate for the size of the note head.  */
   Real chord_start_y = Stem::chord_start_y (stem) + 0.33 * ss * stemdir;
Index: lilypond/lily/stem.cc
diff -u lilypond/lily/stem.cc:1.271 lilypond/lily/stem.cc:1.272
--- lilypond/lily/stem.cc:1.271 Tue Apr 19 13:11:25 2005
+++ lilypond/lily/stem.cc       Wed May  4 10:35:56 2005
@@ -298,7 +298,7 @@
     {
       SCM sshorten = me->get_property ("stem-shorten");
       SCM scm_shorten = scm_is_pair (sshorten)
-       ? robust_list_ref ((duration_log (me) - 2) >? 0, sshorten) : SCM_EOL;
+       ? robust_list_ref (max (duration_log (me) - 2, 0), sshorten) : SCM_EOL;
       Real shorten = 2* robust_scm2double (scm_shorten, 0);
 
       /* On boundary: shorten only half */
@@ -332,7 +332,7 @@
          if (dir == DOWN)
            minlen -= 1.0;
        }
-      length = length >? (minlen + 1.0);
+      length = max (length, minlen + 1.0);
     }
 
   Real st = dir ? hp[dir] + dir * length : 0;
@@ -598,8 +598,8 @@
 SCM
 Stem::width_callback (SCM e, SCM ax)
 {
-  Axis a = (Axis) scm_to_int (ax);
-  assert (a == X_AXIS);
+  (void) ax;
+  assert (scm_to_int (ax) == X_AXIS);
   Grob *me = unsmob_grob (e);
 
   Interval r;
@@ -671,11 +671,11 @@
 
       y2 -= d
        * (0.5 * beam_thickness
-          + beam_translation * (0 >? (beam_count - 1))
+          + beam_translation * max (0, (beam_count - 1))
           + stemlet_length) / half_space;
     }
 
-  Interval stem_y (y1 <? y2, y2 >? y1);
+  Interval stem_y (min (y1, y2), max (y2, y1));
 
   if (Grob *hed = support_head (me))
     {
@@ -828,7 +828,7 @@
     /* stem only extends to center of beam */
     - 0.5 * beam_thickness;
 
-  ideal_length = ideal_length >? ideal_minimum_length;
+  ideal_length = max (ideal_length, ideal_minimum_length);
 
   /* Convert to Y position, calculate for dir == UP */
   Real note_start
@@ -858,10 +858,10 @@
     {
       /* Highest beam of (UP) beam must never be lower than middle
         staffline */
-      ideal_y = ideal_y >? 0;
+      ideal_y = max (ideal_y, 0.0);
       /* Lowest beam of (UP) beam must never be lower than second staffline */
-      ideal_y = ideal_y >? (-staff_space
-                           - beam_thickness + height_of_my_beams);
+      ideal_y = max (ideal_y, (-staff_space
+                              - beam_thickness + height_of_my_beams));
     }
 
   ideal_y -= robust_scm2double (beam->get_property ("shorten"), 0);
@@ -882,7 +882,7 @@
     {
       Interval y_ext = tremolo->extent (tremolo, Y_AXIS);
       y_ext.widen (0.5);       // FIXME. Should be tunable? 
-      minimum_length = minimum_length >? y_ext.length ();
+      minimum_length = max (minimum_length, y_ext.length ());
     }
   
   ideal_y *= my_dir;
Index: lilypond/lily/system-start-delimiter.cc
diff -u lilypond/lily/system-start-delimiter.cc:1.92 
lilypond/lily/system-start-delimiter.cc:1.93
--- lilypond/lily/system-start-delimiter.cc:1.92        Thu Mar 10 14:36:12 2005
+++ lilypond/lily/system-start-delimiter.cc     Wed May  4 10:35:56 2005
@@ -168,7 +168,7 @@
   fm = select_font (me->get_layout (), scm_list_n (alist, SCM_UNDEFINED));
 
   int lo = 0;
-  int hi = (fm->count () - 1) >? 2;
+  int hi = max (fm->count () - 1,2);
   Box b;
 
   /* do a binary search for each Y, not very efficient, but passable?  */
Index: lilypond/lily/tfm.cc
diff -u lilypond/lily/tfm.cc:1.49 lilypond/lily/tfm.cc:1.50
--- lilypond/lily/tfm.cc:1.49   Wed Mar 16 19:19:15 2005
+++ lilypond/lily/tfm.cc        Wed May  4 10:35:56 2005
@@ -45,8 +45,8 @@
   Real point_constant = 1 PT;
 
   return Box (Interval (0, width_ * point_constant),
-             Interval ((d <? height_) * point_constant,
-                       (d >? height_) * point_constant));
+             Interval (min (d, height_) * point_constant,
+                       max (d, height_) * point_constant));
 }
 
 Tex_font_metric::Tex_font_metric ()
@@ -126,4 +126,5 @@
 Tex_font_metric::name_to_index (String) const
 {
   assert (false);
+  return 0;
 }
Index: lilypond/lily/tuplet-engraver.cc
diff -u lilypond/lily/tuplet-engraver.cc:1.71 
lilypond/lily/tuplet-engraver.cc:1.72
--- lilypond/lily/tuplet-engraver.cc:1.71       Thu Mar 10 14:36:12 2005
+++ lilypond/lily/tuplet-engraver.cc    Wed May  4 10:35:56 2005
@@ -54,7 +54,7 @@
 
          SCM s = get_property ("tupletSpannerDuration");
          if (unsmob_moment (s))
-           d.span_stop_ = d.span_stop_ <? (now_mom () + *unsmob_moment 
(s)).main_part_;
+           d.span_stop_ = min (d.span_stop_, (now_mom () + *unsmob_moment 
(s)).main_part_);
 
          tuplets_.push (d);
        }


_______________________________________________
Lilypond-cvs mailing list
Lilypond-cvs@gnu.org
http://lists.gnu.org/mailman/listinfo/lilypond-cvs

Reply via email to