]> git.donarmstrong.com Git - lilypond.git/commitdiff
*** empty log message ***
authorHan-Wen Nienhuys <hanwen@xs4all.nl>
Wed, 4 May 2005 10:35:56 +0000 (10:35 +0000)
committerHan-Wen Nienhuys <hanwen@xs4all.nl>
Wed, 4 May 2005 10:35:56 +0000 (10:35 +0000)
16 files changed:
ChangeLog
lily/rest-collision.cc
lily/scm-hash.cc
lily/side-position-interface.cc
lily/simple-spacer.cc
lily/skyline.cc
lily/slur-configuration.cc
lily/slur-scoring.cc
lily/slur.cc
lily/span-bar.cc
lily/staff-spacing.cc
lily/stem-tremolo.cc
lily/stem.cc
lily/system-start-delimiter.cc
lily/tfm.cc
lily/tuplet-engraver.cc

index 3406001df9e0bac6fed611e286c2e13797246f2c..081397d992b0c1ea55ded513cc8b6ea3d7977b96 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,7 @@
 2005-05-04  Han-Wen Nienhuys  <hanwen@xs4all.nl>
 
+       * lily/*.cc: more <? >? to min/max changes
+
        * lily/include/interpretation-context-handle.hh: rename
        Interpretation_context_handle to Context_handle.
 
index 7bfc3385f1624d173791b949b82b4e4e7f296ec6..ea9dba5010deaf58d060ac1a81998029ac254b72 100644 (file)
@@ -26,8 +26,8 @@ SCM
 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 @@ Rest_collision::do_shift (Grob *me)
        }
 
       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 af73ca3a306807f6f481b514ba7ddb788ab381f1..f59adc010448567bb9af559c34473da6fe507938 100644 (file)
@@ -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 @@ Scheme_hash_table::Scheme_hash_table (Scheme_hash_table const &src)
   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 @@ Scheme_hash_table::operator = (Scheme_hash_table const &src)
   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 eed4f322bc45b84ad07ab511d72c45900b52bccb..d9689abaaa5466af9a5bd5db4b7f5faac3ebf75f 100644 (file)
@@ -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 @@ Side_position_interface::aligned_side (SCM element_smob, SCM axis)
 
       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 5f21a62a3b040186ae30dfbcb7de86cbf623e4b6..f23dfb84504eb71001f2214c90711d9a12867975 100644 (file)
@@ -100,11 +100,10 @@ Simple_spacer::add_rod (int l, int r, Real dist)
   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 @@ Simple_spacer::active_blocking_force () const
   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 @@ Simple_spacer::my_solve_natural_len ()
 
   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 b3b6349461a25369fffab2aaf0f954a05f359c71..455ebb2b9b5c9897c93f8effeb5a5968d3dd3328 100644 (file)
@@ -155,7 +155,7 @@ skyline_meshing_distance (Array<Skyline_entry> const &buildings,
       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 4d4e3de17119b243803a211958d7a932d3438b0a..7fe077d12e00ec267b3df886b2719882732ab09b 100644 (file)
@@ -88,7 +88,7 @@ fit_factor (Offset dz_unit, Offset dz_perp,
       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 @@ Slur_configuration::generate_curve (Slur_score_state const &state,
        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 @@ Slur_configuration::generate_curve (Slur_score_state const &state,
   (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 @@ Slur_configuration::generate_curve (Slur_score_state const &state,
 
   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 @@ Slur_configuration::score_encompass (Slur_score_state const &state)
              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 @@ Slur_configuration::score_encompass (Slur_score_state const &state)
            {
 
              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 @@ Slur_configuration::score_encompass (Slur_score_state const &state)
          // ?
          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 @@ Slur_configuration::score_encompass (Slur_score_state const &state)
       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 @@ Slur_configuration::score_encompass (Slur_score_state const &state)
       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 @@ Slur_configuration::score_extra_encompass (Slur_score_state const &state)
 
       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 @@ Slur_configuration ::score_slopes (Slur_score_state const &state)
   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 @@ Slur_configuration ::score_slopes (Slur_score_state const &state)
 
   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 160e157089c104be4c3450d01b3f2370bdaa8162..9b005386c4153c8ffcdf2338988d913bd9b2377b 100644 (file)
@@ -469,10 +469,9 @@ Slur_score_state::get_y_attachment_range () const
       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 929353c00a6f19d0abde93a866f3fc11a526b358..3e1ee4f126c08ed42cd315dcf7a49686fbc0282c 100644 (file)
@@ -130,6 +130,7 @@ Slur::outside_slur_callback (SCM grob, SCM axis)
 {
   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 @@ Slur::outside_slur_callback (SCM grob, SCM axis)
       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 4ed3029df79799567a2e12b984a8818bc4631427..388ab5666d0b0743cbb1424f650b2015c186e8a0 100644 (file)
@@ -114,8 +114,9 @@ SCM
 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 @@ SCM
 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 b175987674282d68ac0b9ffb7826978c2de3a39f..762e039dc1338080a4f938fd9d8a96b0c4d1e26d 100644 (file)
@@ -32,7 +32,7 @@ Staff_spacing::next_note_correction (Grob *me,
     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 @@ Staff_spacing::next_note_correction (Grob *me,
       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 @@ Staff_spacing::next_note_correction (Grob *me,
          {
            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 @@ Staff_spacing::next_notes_correction (Grob *me, Grob *last_grob)
     {
       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 @@ Staff_spacing::get_spacing_params (Grob *me, Real *space, Real *fixed)
     }
   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 b68699725c361dca2ffd2acbf8d1578c85c84630..b1daa6284bc8cc1e14dc61eb4ed10f1018c48bc9 100644 (file)
@@ -144,7 +144,7 @@ Stem_tremolo::print (SCM grob)
   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 5eebd974e5cb6dfad78aa3ab55776f1c172011fc..2bdc2fbcf53dd0d0857e70e6f0e7db39ed680a69 100644 (file)
@@ -298,7 +298,7 @@ Stem::get_default_stem_end_position (Grob *me)
     {
       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 @@ Stem::get_default_stem_end_position (Grob *me)
          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 @@ MAKE_SCHEME_CALLBACK (Stem, width_callback, 2);
 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 @@ Stem::print (SCM smob)
 
       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::calc_stem_info (Grob *me)
     /* 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 @@ Stem::calc_stem_info (Grob *me)
     {
       /* 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 @@ Stem::calc_stem_info (Grob *me)
     {
       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 0a5b6fe532e60ae6375201b02ab12be6fa4cc26a..f079c7db13f94c7743ee8d1eed2b813463b237c7 100644 (file)
@@ -168,7 +168,7 @@ System_start_delimiter::staff_brace (Grob *me, Real y)
   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 e5aeea72cdb9d9fb97b10586d5660b186cffee5c..485fde0b5cf15a94c15b9cd927d031d4e3a11452 100644 (file)
@@ -45,8 +45,8 @@ Tex_font_char_metric::dimensions () const
   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 @@ int
 Tex_font_metric::name_to_index (String) const
 {
   assert (false);
+  return 0;
 }
index 9acf07106b601525e6a388cfc0fa85bbbb9390b2..c2ca198984426f9d896815e73349f7f7601614de 100644 (file)
@@ -54,7 +54,7 @@ Tuplet_engraver::try_music (Music *music)
 
          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);
        }