]> git.donarmstrong.com Git - lilypond.git/commitdiff
Fix GCC 4.3.0 warnings about parentheses and braces
authorJohn Mandereau <john.mandereau@gmail.com>
Mon, 5 Jan 2009 11:32:38 +0000 (12:32 +0100)
committerJohn Mandereau <john.mandereau@gmail.com>
Sat, 24 Jan 2009 01:07:21 +0000 (02:07 +0100)
lily/key-engraver.cc
lily/note-collision.cc
lily/vaticana-ligature-engraver.cc
lily/volta-repeat-iterator.cc

index 4ca7a39f2b1c263268a9976d543ba7d20751cb2c..87040e0c41630a2238f5cb68a8b597eeeebf628a 100644 (file)
@@ -79,8 +79,9 @@ Key_engraver::create_key (bool is_default)
              SCM new_alter_pair = scm_assoc (scm_caar (s), key);
              Rational old_alter = robust_scm2rational (scm_cdar (s), 0);
              if (new_alter_pair == SCM_BOOL_F
-                 || extranatural
-                 && (ly_scm2rational (scm_cdr (new_alter_pair)) - old_alter)*old_alter < Rational (0))
+                 || (extranatural
+                     && (ly_scm2rational (scm_cdr (new_alter_pair)) - old_alter)*old_alter
+                         < Rational (0)))
                {
                  *tail = scm_cons (scm_car (s), *tail);
                  tail = SCM_CDRLOC (*tail);
index 6946eac2fa786420e5e080a70ec65978f0a180b8..591c7bc9945437f886eae2e0dbb45fda8a21a125 100644 (file)
@@ -290,20 +290,22 @@ check_meshing_chords (Grob *me,
     {
       Grob *staff = Staff_symbol_referencer::get_staff_symbol (me);
       if (!Staff_symbol_referencer::on_line (staff, ups[0]))
-       /*
-         TODO: consider junking the else body.
-       */
-       if (to_boolean (me->get_property ("prefer-dotted-right")))
-         {
-           shift_amount = 0.5;
-         }
-       else
-         {
-           Grob *d = unsmob_grob (head_up->get_object ("dot"));
-           Grob *parent = d->get_parent (X_AXIS);
-           if (Dot_column::has_interface (parent))
-             Side_position_interface::add_support (parent, head_down);
-         }
+       {
+         /*
+           TODO: consider junking the else body.
+         */
+         if (to_boolean (me->get_property ("prefer-dotted-right")))
+           {
+             shift_amount = 0.5;
+           }
+         else
+           {
+             Grob *d = unsmob_grob (head_up->get_object ("dot"));
+             Grob *parent = d->get_parent (X_AXIS);
+             if (Dot_column::has_interface (parent))
+               Side_position_interface::add_support (parent, head_down);
+           }
+       }
     }
 
   /* For full or close half collisions, the right hand head may
index 0e91f1765a8deca0a953b496a6601d3c330c833c..414020db7a7de54ec0e816e376f23866b491e0e8 100644 (file)
@@ -550,66 +550,70 @@ Vaticana_ligature_engraver::transform_heads (Spanner *ligature,
        else
          glyph_name = "vaticana.inclinatum";
       else if (prefix_set & DEMINUTUM)
-       if (i == 0)
-         {
-           // initio debilis
-           glyph_name = "vaticana.reverse.plica";
-         }
-       else if (prev_delta_pitch > 0)
-         {
-           // epiphonus
-           if (! (prev_context_info & FLEXA_RIGHT))
-             /* correct head of previous primitive */
+       {
+         if (i == 0)
+           {
+             // initio debilis
+             glyph_name = "vaticana.reverse.plica";
+           }
+         else if (prev_delta_pitch > 0)
+           {
+             // epiphonus
+             if (! (prev_context_info & FLEXA_RIGHT))
+               {
+                 /* correct head of previous primitive */
+                 if (prev_delta_pitch > 1)
+                   prev_glyph_name = "vaticana.epiphonus";
+                 else
+                   prev_glyph_name = "vaticana.vepiphonus";
+               }
              if (prev_delta_pitch > 1)
-               prev_glyph_name = "vaticana.epiphonus";
+               glyph_name = "vaticana.plica";
              else
-               prev_glyph_name = "vaticana.vepiphonus";
-           if (prev_delta_pitch > 1)
-             glyph_name = "vaticana.plica";
-           else
-             glyph_name = "vaticana.vplica";
-         }
-       else if (prev_delta_pitch < 0)
-         {
-           // cephalicus
-           if (! (prev_context_info & FLEXA_RIGHT))
-             /* correct head of previous primitive */
-             {
-               if (i > 1)
-                 {
-                   /* cephalicus head with fixed size cauda */
-                   prev_glyph_name = "vaticana.inner.cephalicus";
-                 }
-               else
-                 {
-                   /* cephalicus head without cauda */
-                   prev_glyph_name = "vaticana.cephalicus";
-                 }
-
-               /*
-                * Flexa has no variable size cauda if its left head is
-                * stacked on the right head.  This is true for
-                * cephalicus.  Hence, remove the cauda.
-                *
-                * Urgh: for the current implementation, this rule only
-                * applies for cephalicus; but it is a fundamental rule.
-                * Therefore, the following line of code should be
-                * placed somewhere else.
-                */
-               prev_primitive->set_property ("add-cauda",
-                                             ly_bool2scm (false));
-             }
-           if (prev_delta_pitch < - 1)
-             glyph_name = "vaticana.reverse.plica";
-           else
-             glyph_name = "vaticana.reverse.vplica";
-         }
-       else // (prev_delta_pitch == 0)
-         {
-           primitive->programming_error ("Vaticana_ligature:"
-                                         " deminutum head must have different"
-                                         " pitch -> ignoring grob");
-         }
+               glyph_name = "vaticana.vplica";
+           }
+         else if (prev_delta_pitch < 0)
+           {
+             // cephalicus
+             if (! (prev_context_info & FLEXA_RIGHT))
+               /* correct head of previous primitive */
+               {
+                 if (i > 1)
+                   {
+                     /* cephalicus head with fixed size cauda */
+                     prev_glyph_name = "vaticana.inner.cephalicus";
+                   }
+                 else
+                   {
+                     /* cephalicus head without cauda */
+                     prev_glyph_name = "vaticana.cephalicus";
+                   }
+
+                 /*
+                  * Flexa has no variable size cauda if its left head is
+                  * stacked on the right head.  This is true for
+                  * cephalicus.  Hence, remove the cauda.
+                  *
+                  * Urgh: for the current implementation, this rule only
+                  * applies for cephalicus; but it is a fundamental rule.
+                  * Therefore, the following line of code should be
+                  * placed somewhere else.
+                  */
+                 prev_primitive->set_property ("add-cauda",
+                                               ly_bool2scm (false));
+               }
+             if (prev_delta_pitch < - 1)
+               glyph_name = "vaticana.reverse.plica";
+             else
+               glyph_name = "vaticana.reverse.vplica";
+           }
+         else // (prev_delta_pitch == 0)
+           {
+             primitive->programming_error ("Vaticana_ligature:"
+                                           " deminutum head must have different"
+                                           " pitch -> ignoring grob");
+           }
+       }
       else if (prefix_set & (CAVUM | LINEA))
        if ((prefix_set & CAVUM) && (prefix_set & LINEA))
          glyph_name = "vaticana.linea.punctum.cavum";
@@ -676,10 +680,12 @@ Vaticana_ligature_engraver::transform_heads (Spanner *ligature,
          if ((context_info & PES_UPPER) && (context_info & STACKED_HEAD))
            {
              if (prev_glyph_name == "vaticana.punctum")
-               if (prev_delta_pitch > 1)
-                 prev_glyph_name = "vaticana.lpes";
-               else
-                 prev_glyph_name = "vaticana.vlpes";
+               {
+                 if (prev_delta_pitch > 1)
+                   prev_glyph_name = "vaticana.lpes";
+                 else
+                   prev_glyph_name = "vaticana.vlpes";
+               }
            }
        }
 
index e018fe74b1ca9b09a0e049c689a46ff6e9a5c1ac..321814b8a8373893cc5c844b80b47fbc0158a457 100644 (file)
@@ -66,7 +66,7 @@ Volta_repeat_iterator::add_repeat_command (SCM what)
   Context *where = get_outlet ()->where_defined (reps, &current_reps);
 
   if (where
-      && current_reps == SCM_EOL || scm_is_pair (current_reps))
+       && (current_reps == SCM_EOL || scm_is_pair (current_reps)))
     {
       current_reps = scm_cons (what, current_reps);
       where->set_property (reps, current_reps);