From: Han-Wen Nienhuys Date: Mon, 28 Jul 2008 05:08:01 +0000 (-0300) Subject: Misc cleanups. X-Git-Tag: release/2.11.54-1~4 X-Git-Url: https://git.donarmstrong.com/?a=commitdiff_plain;h=1ad18e6d0f1ca88bcabe82b5a0d8fad218d4ae2d;p=lilypond.git Misc cleanups. --- diff --git a/lily/gregorian-ligature-engraver.cc b/lily/gregorian-ligature-engraver.cc index 91232d5b31..36cf898af8 100644 --- a/lily/gregorian-ligature-engraver.cc +++ b/lily/gregorian-ligature-engraver.cc @@ -208,20 +208,22 @@ provide_context_info (vector primitives) int prefix_set = scm_to_int (primitive->get_property ("prefix-set")); if (prefix_set & PES_OR_FLEXA) - if (!i) // ligature may not start with 2nd head of pes or flexa - primitive->warning (_ ("cannot apply `\\~' on first head of ligature")); - else if (pitch > prev_pitch) // pes - { - prev_context_info |= PES_LOWER; - context_info |= PES_UPPER; - } - else if (pitch < prev_pitch) // flexa - { - prev_context_info |= FLEXA_LEFT; - context_info |= FLEXA_RIGHT; - } - else // (pitch == prev_pitch) - primitive->warning (_ ("cannot apply `\\~' on heads with identical pitch")); + { + if (!i) // ligature may not start with 2nd head of pes or flexa + primitive->warning (_ ("cannot apply `\\~' on first head of ligature")); + else if (pitch > prev_pitch) // pes + { + prev_context_info |= PES_LOWER; + context_info |= PES_UPPER; + } + else if (pitch < prev_pitch) // flexa + { + prev_context_info |= FLEXA_LEFT; + context_info |= FLEXA_RIGHT; + } + else // (pitch == prev_pitch) + primitive->warning (_ ("cannot apply `\\~' on heads with identical pitch")); + } if (prev_prefix_set & DEMINUTUM) context_info |= AFTER_DEMINUTUM; diff --git a/lily/misc.cc b/lily/misc.cc index 3b9d87da16..85db2468cd 100644 --- a/lily/misc.cc +++ b/lily/misc.cc @@ -53,7 +53,7 @@ peak_around (Real epsilon, Real threshold, Real x) { if (x < 0) return 1.0; - return max (- epsilon * (x - threshold) / ((x + epsilon) * threshold), 0.0); + return max (- epsilon * (x - threshold) / ((x + epsilon) * threshold), 0.0); } /* diff --git a/lily/piano-pedal-engraver.cc b/lily/piano-pedal-engraver.cc index faa078fdf2..b3021cbcb7 100644 --- a/lily/piano-pedal-engraver.cc +++ b/lily/piano-pedal-engraver.cc @@ -41,7 +41,7 @@ */ /* Ugh: This declaration is duplicated in piano-pedal-performer */ -typedef enum Pedal_type { +enum Pedal_type { SOSTENUTO, SUSTAIN, UNA_CORDA,