From 2a4086ccaf4f434d5819b8722f941418d5c65528 Mon Sep 17 00:00:00 2001 From: Graham Percival Date: Fri, 10 Aug 2012 15:08:32 +0100 Subject: [PATCH] Run fixcc.py with astyle 2.02. --- flower/include/direction.hh | 1 - flower/include/yaffut.hh | 1 - lily/completion-note-heads-engraver.cc | 4 ++-- lily/context-mod-scheme.cc | 6 +++--- lily/context-scheme.cc | 6 +++--- lily/dispatcher-scheme.cc | 1 - lily/dispatcher.cc | 6 +++--- lily/footnote-engraver.cc | 28 ++++++++++++------------- lily/global-context.cc | 2 +- lily/include/lily-lexer.hh | 2 +- lily/include/translator.icc | 4 ++-- lily/lily-guile.cc | 28 ++++++++++++------------- lily/moment-scheme.cc | 29 +++++++++++++------------- lily/music.cc | 4 ++-- lily/note-collision.cc | 2 +- lily/one-line-page-breaking.cc | 2 +- lily/page-layout-problem.cc | 2 +- lily/parse-scm.cc | 6 +++--- lily/part-combine-iterator.cc | 14 ++++++------- lily/phrasing-slur-engraver.cc | 15 ++++++------- lily/pitch-scheme.cc | 3 +-- lily/pure-from-neighbor-engraver.cc | 10 ++++----- lily/repeat-acknowledge-engraver.cc | 25 ++++++++++------------ lily/rest-collision.cc | 1 - lily/rhythmic-music-iterator.cc | 4 ++-- lily/slur-engraver.cc | 15 ++++++------- lily/spanner.cc | 2 +- lily/staff-symbol-engraver.cc | 9 ++++---- lily/tie-formatting-problem.cc | 10 ++++----- lily/time-signature.cc | 4 ++-- lily/tweak-engraver.cc | 16 +++++++------- 31 files changed, 129 insertions(+), 133 deletions(-) diff --git a/flower/include/direction.hh b/flower/include/direction.hh index 97c0f6d79b..dcb794eea1 100644 --- a/flower/include/direction.hh +++ b/flower/include/direction.hh @@ -80,7 +80,6 @@ flip (Direction *i) #define LEFT_and_RIGHT(d) \ Direction d = LEFT; d != CENTER; d = (d == LEFT ? RIGHT : CENTER) - /** if d > 0: the max operator if d < 0: the min operator diff --git a/flower/include/yaffut.hh b/flower/include/yaffut.hh index 38fba30801..aa54fa6616 100644 --- a/flower/include/yaffut.hh +++ b/flower/include/yaffut.hh @@ -398,7 +398,6 @@ void assert_throw (void (*pf) (), const char *at = "") #include #include - int main (int argc, const char *argv[]) { std::cout << "pid(" << getpid () << ")" << std::endl; diff --git a/lily/completion-note-heads-engraver.cc b/lily/completion-note-heads-engraver.cc index 973fb4f28d..e0b57b8248 100644 --- a/lily/completion-note-heads-engraver.cc +++ b/lily/completion-note-heads-engraver.cc @@ -124,13 +124,13 @@ Completion_heads_engraver::next_moment (Rational const ¬e_len) if (unit) { Rational const now_unit = e->main_part_ / unit->main_part_; - if (now_unit.den() > 1) + if (now_unit.den () > 1) { /* within a unit - go to the end of that */ result = unit->main_part_ - * (Rational (1) - (now_unit - now_unit.trunc_rat ())); + * (Rational (1) - (now_unit - now_unit.trunc_rat ())); } else { diff --git a/lily/context-mod-scheme.cc b/lily/context-mod-scheme.cc index 9c79c37859..5479581b1c 100644 --- a/lily/context-mod-scheme.cc +++ b/lily/context-mod-scheme.cc @@ -57,14 +57,14 @@ LY_DEFINE (ly_make_context_mod, "ly:make-context-mod", } LY_DEFINE (ly_context_mod_apply_x, "ly:context-mod-apply!", - 2, 0, 0, (SCM context, SCM mod), - "Apply the context modification @var{mod} to @var{context}.") + 2, 0, 0, (SCM context, SCM mod), + "Apply the context modification @var{mod} to @var{context}.") { LY_ASSERT_SMOB (Context, context, 1); LY_ASSERT_SMOB (Context_mod, mod, 2); apply_property_operations (unsmob_context (context), - unsmob_context_mod (mod)->get_mods ()); + unsmob_context_mod (mod)->get_mods ()); scm_remember_upto_here_1 (context); return SCM_UNSPECIFIED; } diff --git a/lily/context-scheme.cc b/lily/context-scheme.cc index 4f3818ecd8..64f8dd8e15 100644 --- a/lily/context-scheme.cc +++ b/lily/context-scheme.cc @@ -213,9 +213,9 @@ LY_DEFINE (ly_context_events_below, "ly:context-events-below", } LY_DEFINE (ly_make_event_class, "ly:make-event-class", - 2, 0, 0, (SCM context, SCM type), - "Make an event class (a list of types) from the given @var{type}" - " within the global context containing @var{context}.") + 2, 0, 0, (SCM context, SCM type), + "Make an event class (a list of types) from the given @var{type}" + " within the global context containing @var{context}.") { LY_ASSERT_SMOB (Context, context, 1); LY_ASSERT_TYPE (ly_is_symbol, type, 2); diff --git a/lily/dispatcher-scheme.cc b/lily/dispatcher-scheme.cc index a87074e799..13854b26d7 100644 --- a/lily/dispatcher-scheme.cc +++ b/lily/dispatcher-scheme.cc @@ -92,7 +92,6 @@ LY_DEFINE (ly_listened_event_class_p, "ly:listened-event-class?", return scm_from_bool (result); } - LY_DEFINE (ly_broadcast, "ly:broadcast", 2, 0, 0, (SCM disp, SCM ev), "Send the stream event @var{ev} to the dispatcher @var{disp}.") diff --git a/lily/dispatcher.cc b/lily/dispatcher.cc index 8e6350f294..0d899f94ba 100644 --- a/lily/dispatcher.cc +++ b/lily/dispatcher.cc @@ -181,9 +181,9 @@ Dispatcher::is_listened_class (SCM cl) static SCM accumulate_types (void * /* closure */, - SCM key, - SCM val, - SCM result) + SCM key, + SCM val, + SCM result) { if (scm_is_pair (val)) return scm_cons (key, result); diff --git a/lily/footnote-engraver.cc b/lily/footnote-engraver.cc index 2f2b9577c2..efa7900b00 100644 --- a/lily/footnote-engraver.cc +++ b/lily/footnote-engraver.cc @@ -106,10 +106,10 @@ Footnote_engraver::acknowledge_grob (Grob_info info) if (mus) { if (!mus->is_mus_type ("footnote-event")) - { - mus->origin ()->programming_error (_ ("Must be footnote-event.")); - return; - } + { + mus->origin ()->programming_error (_ ("Must be footnote-event.")); + return; + } footnotify (info.grob (), mus->to_event (context ())->unprotect ()); @@ -123,16 +123,16 @@ Footnote_engraver::acknowledge_grob (Grob_info info) string grobname = info.grob ()->name (); for (vsize i = 0; i < events_.size (); i++) - { - SCM name = events_[i]->get_property ("symbol"); - if (scm_is_symbol (name) - && grobname == ly_symbol2string (name)) - { - footnotify (info.grob (), events_[i]->self_scm ()); - // Event has exhausted its footnote - events_[i]->set_property ("symbol", SCM_EOL); - } - } + { + SCM name = events_[i]->get_property ("symbol"); + if (scm_is_symbol (name) + && grobname == ly_symbol2string (name)) + { + footnotify (info.grob (), events_[i]->self_scm ()); + // Event has exhausted its footnote + events_[i]->set_property ("symbol", SCM_EOL); + } + } } } diff --git a/lily/global-context.cc b/lily/global-context.cc index 431ffe4de3..005c54b45e 100644 --- a/lily/global-context.cc +++ b/lily/global-context.cc @@ -55,7 +55,7 @@ Global_context::Global_context (Output_def *o) SCM p = get_property ("EventClasses"); ancestor_lookup_ = scm_make_hash_table (scm_length (p)); - for (;scm_is_pair (p); p = scm_cdr (p)) + for (; scm_is_pair (p); p = scm_cdr (p)) scm_hashq_set_x (ancestor_lookup_, scm_caar (p), scm_car (p)); accepts_list_ = scm_list_1 (ly_symbol2scm ("Score")); diff --git a/lily/include/lily-lexer.hh b/lily/include/lily-lexer.hh index e078c9edc3..caa3b4b44b 100644 --- a/lily/include/lily-lexer.hh +++ b/lily/include/lily-lexer.hh @@ -52,7 +52,7 @@ private: int hidden_state_; SCM eval_scm (SCM, char extra_token = 0); public: - SCM eval_scm_token (SCM sval) { return eval_scm (sval, '#'); } + SCM eval_scm_token (SCM sval) { return eval_scm (sval, '#'); } SCM extra_tokens_; YYSTYPE *lexval_; Input *lexloc_; diff --git a/lily/include/translator.icc b/lily/include/translator.icc index fec5aaacb1..4ce8f6902e 100644 --- a/lily/include/translator.icc +++ b/lily/include/translator.icc @@ -36,8 +36,8 @@ static void _ ## T ## _adder () \ { \ T *t = new T; \ - T::static_description_ = \ - scm_permanent_object (t->static_translator_description ()); \ + T::static_description_ = \ + scm_permanent_object (t->static_translator_description ()); \ add_translator (t); \ } \ SCM T::translator_description () const \ diff --git a/lily/lily-guile.cc b/lily/lily-guile.cc index 96097e4cf0..e8380324fb 100644 --- a/lily/lily-guile.cc +++ b/lily/lily-guile.cc @@ -582,8 +582,8 @@ ly_rational2scm (Rational r) { if (r.is_infinity ()) { - if (r > Rational(0)) - return scm_inf (); + if (r > Rational (0)) + return scm_inf (); return scm_difference (scm_inf (), SCM_UNDEFINED); } @@ -598,17 +598,17 @@ ly_scm2rational (SCM r) if (scm_is_true (scm_inf_p (r))) { if (scm_is_true (scm_positive_p (r))) - { - Rational r; - r.set_infinite (1); - return r; - } + { + Rational r; + r.set_infinite (1); + return r; + } else - { - Rational r; - r.set_infinite (-1); - return r; - } + { + Rational r; + r.set_infinite (-1); + return r; + } } return Rational (scm_to_int64 (scm_numerator (r)), @@ -628,8 +628,8 @@ bool ly_is_rational (SCM n) { return (scm_is_real (n) - && (scm_is_true (scm_exact_p (n)) - || scm_is_true (scm_inf_p (n)))); + && (scm_is_true (scm_exact_p (n)) + || scm_is_true (scm_inf_p (n)))); } SCM diff --git a/lily/moment-scheme.cc b/lily/moment-scheme.cc index 2d81e8075e..e7ed72f093 100644 --- a/lily/moment-scheme.cc +++ b/lily/moment-scheme.cc @@ -29,14 +29,14 @@ LY_DEFINE (ly_make_moment, "ly:make-moment", " a pair of rationals (@var{m},@tie{}@var{g}), where @var{m} is" " the timing for the main notes, and @var{g} the timing for" " grace notes. In absence of grace notes, @var{g}@tie{}is zero.\n" - "\n" - "For compatibility reasons, it is possible to write two" - " numbers specifying numerator and denominator instead of" + "\n" + "For compatibility reasons, it is possible to write two" + " numbers specifying numerator and denominator instead of" " the rationals. These forms cannot be mixed, and the two-" - "argument form is disambiguated by the sign of the second" - " argument: if it is positive, it can only be a denominator" - " and not a grace timing." -) + "argument form is disambiguated by the sign of the second" + " argument: if it is positive, it can only be a denominator" + " and not a grace timing." + ) { LY_ASSERT_TYPE (ly_is_rational, m, 1); if (SCM_UNBNDP (g)) @@ -46,14 +46,14 @@ LY_DEFINE (ly_make_moment, "ly:make-moment", { LY_ASSERT_TYPE (ly_is_rational, g, 2); if (scm_is_true (scm_positive_p (g))) - { - LY_ASSERT_TYPE (scm_is_integer, m, 1); - LY_ASSERT_TYPE (scm_is_integer, g, 2); - return Moment (Rational (scm_to_int64 (m), - scm_to_int64 (g))).smobbed_copy (); - } + { + LY_ASSERT_TYPE (scm_is_integer, m, 1); + LY_ASSERT_TYPE (scm_is_integer, g, 2); + return Moment (Rational (scm_to_int64 (m), + scm_to_int64 (g))).smobbed_copy (); + } return Moment (ly_scm2rational (m), - ly_scm2rational (g)).smobbed_copy (); + ly_scm2rational (g)).smobbed_copy (); } LY_ASSERT_TYPE (scm_is_integer, m, 1); @@ -173,7 +173,6 @@ LY_DEFINE (ly_moment_main, "ly:moment-main", return ly_rational2scm (unsmob_moment (mom)->main_part_); } - LY_DEFINE (ly_moment_main_numerator, "ly:moment-main-numerator", 1, 0, 0, (SCM mom), "Extract numerator from main timing.") diff --git a/lily/music.cc b/lily/music.cc index cc814c074b..7a38d7af41 100644 --- a/lily/music.cc +++ b/lily/music.cc @@ -234,7 +234,7 @@ transpose_mutable (SCM alist, Pitch delta) m->transpose (delta); } else if (prop == ly_symbol2scm ("elements") - || prop == ly_symbol2scm ("articulations")) + || prop == ly_symbol2scm ("articulations")) transpose_music_list (val, delta); else if (prop == ly_symbol2scm ("pitch-alist") && scm_is_pair (val)) @@ -280,7 +280,7 @@ Music::to_event (Context *c) const programming_error ("Not a music type"); Stream_event *e = new Stream_event (c->make_event_class (class_name), - mutable_property_alist_); + mutable_property_alist_); Moment length = get_length (); if (length.to_bool ()) e->set_property ("length", length.smobbed_copy ()); diff --git a/lily/note-collision.cc b/lily/note-collision.cc index e1c196650c..3ab245ca5e 100644 --- a/lily/note-collision.cc +++ b/lily/note-collision.cc @@ -178,7 +178,7 @@ check_meshing_chords (Grob *me, full_collide = full_collide || (close_half_collide && distant_half_collide) || ( distant_half_collide // like full_ for wholes and longer - && (up_ball_type <= 0 || down_ball_type <= 0)); + && (up_ball_type <= 0 || down_ball_type <= 0)); /* Determine which chord goes on the left, and which goes right. Up-stem usually goes on the right, but if chords just 'touch' we can put diff --git a/lily/one-line-page-breaking.cc b/lily/one-line-page-breaking.cc index 018ef9cff3..213864462f 100644 --- a/lily/one-line-page-breaking.cc +++ b/lily/one-line-page-breaking.cc @@ -55,7 +55,7 @@ One_line_page_breaking::solve () { if (Paper_score *ps = system_specs_[i].pscore_) { - vector cols = ps->root_system ()->used_columns (); + vector cols = ps->root_system ()->used_columns (); // No indent, "infinite" line width, ragged. Column_x_positions pos = get_line_configuration (cols, numeric_limits::max (), 0, true); diff --git a/lily/page-layout-problem.cc b/lily/page-layout-problem.cc index 68f870b2dc..7c99670551 100644 --- a/lily/page-layout-problem.cc +++ b/lily/page-layout-problem.cc @@ -592,7 +592,7 @@ Page_layout_problem::append_system (System *sys, Spring const &spring, Real inde if (sky) first_skyline.merge ((*sky)[UP]); first_skyline.shift (indent); - minimum_distance = first_skyline.distance (bottom_skyline_) - bottom_loose_baseline_ ; + minimum_distance = first_skyline.distance (bottom_skyline_) - bottom_loose_baseline_; } bottom_skyline_ = down_skyline; elements_.push_back (Element (elts, minimum_offsets, minimum_distance, padding)); diff --git a/lily/parse-scm.cc b/lily/parse-scm.cc index 3dc07fa3d5..44b99db2ad 100644 --- a/lily/parse-scm.cc +++ b/lily/parse-scm.cc @@ -68,9 +68,9 @@ internal_ly_parse_scm (Parse_start *ps) form = scm_list_1 (c); } if (multiple) - form = scm_list_3 (ly_symbol2scm ("apply"), - ly_symbol2scm ("values"), - form); + form = scm_list_3 (ly_symbol2scm ("apply"), + ly_symbol2scm ("values"), + form); return scm_cons (form, make_input (ps->start_location_)); } diff --git a/lily/part-combine-iterator.cc b/lily/part-combine-iterator.cc index 06449fb5dc..c0c9acc893 100644 --- a/lily/part-combine-iterator.cc +++ b/lily/part-combine-iterator.cc @@ -224,8 +224,8 @@ Part_combine_iterator::kill_mmrest (int in) if (!mmrest_event_) { mmrest_event_ = new Stream_event - (handles_[in].get_context ()->make_event_class - (ly_symbol2scm ("multi-measure-rest-event"))); + (handles_[in].get_context ()->make_event_class + (ly_symbol2scm ("multi-measure-rest-event"))); mmrest_event_->set_property ("duration", SCM_EOL); mmrest_event_->unprotect (); } @@ -261,7 +261,7 @@ Part_combine_iterator::unisono (bool silent) if (!unisono_event_) { unisono_event_ = new Stream_event - (out->make_event_class (ly_symbol2scm ("unisono-event"))); + (out->make_event_class (ly_symbol2scm ("unisono-event"))); unisono_event_->unprotect (); } @@ -290,8 +290,8 @@ Part_combine_iterator::solo1 () if (!solo_one_event_) { solo_one_event_ = new Stream_event - (first_iter_->get_outlet ()->make_event_class - (ly_symbol2scm ("solo-one-event"))); + (first_iter_->get_outlet ()->make_event_class + (ly_symbol2scm ("solo-one-event"))); solo_one_event_->unprotect (); } @@ -317,8 +317,8 @@ Part_combine_iterator::solo2 () if (!solo_two_event_) { solo_two_event_ = new Stream_event - (second_iter_->get_outlet ()->make_event_class - (ly_symbol2scm ("solo-two-event"))); + (second_iter_->get_outlet ()->make_event_class + (ly_symbol2scm ("solo-two-event"))); solo_two_event_->unprotect (); } diff --git a/lily/phrasing-slur-engraver.cc b/lily/phrasing-slur-engraver.cc index 5e5e7ced8c..123878b644 100644 --- a/lily/phrasing-slur-engraver.cc +++ b/lily/phrasing-slur-engraver.cc @@ -83,9 +83,9 @@ Phrasing_slur_engraver::Phrasing_slur_engraver () void Phrasing_slur_engraver::derived_mark () const { - for (vsize i=start_events_.size(); i--;) + for (vsize i = start_events_.size (); i--;) scm_gc_mark (start_events_[i]->self_scm ()); - for (vsize i=stop_events_.size(); i--;) + for (vsize i = stop_events_.size (); i--;) scm_gc_mark (stop_events_[i]->self_scm ()); } @@ -203,7 +203,7 @@ Phrasing_slur_engraver::process_music () for (vsize j = stop_events_.size (); --j > i;) { if (id == robust_scm2string (stop_events_[j]->get_property ("spanner-id"), "")) - stop_events_.erase (stop_events_.begin() + j); + stop_events_.erase (stop_events_.begin () + j); } } else @@ -241,10 +241,11 @@ Phrasing_slur_engraver::process_music () Stream_event *c = unsmob_stream_event (slurs_[j]->get_property ("cause")); - if (!c) { - slurs_[j]->programming_error ("phrasing slur without a cause"); - continue; - } + if (!c) + { + slurs_[j]->programming_error ("phrasing slur without a cause"); + continue; + } Direction slur_dir = to_dir (c->get_property ("direction")); diff --git a/lily/pitch-scheme.cc b/lily/pitch-scheme.cc index f4231f0685..0433325523 100644 --- a/lily/pitch-scheme.cc +++ b/lily/pitch-scheme.cc @@ -105,7 +105,7 @@ LY_DEFINE (ly_pitch_notename, "ly:pitch-notename", } LY_DEFINE (ly_pitch_tones, "ly:pitch-tones", - 1, 0, 0, (SCM pp), + 1, 0, 0, (SCM pp), "Calculate the number of tones of@tie{}@var{pp} from" " middle@tie{}C as a rational number.") { @@ -113,7 +113,6 @@ LY_DEFINE (ly_pitch_tones, "ly:pitch-tones", return ly_rational2scm (unsmob_pitch (pp)->tone_pitch ()); } - LY_DEFINE (ly_pitch_quartertones, "ly:pitch-quartertones", 1, 0, 0, (SCM pp), "Calculate the number of quarter tones of@tie{}@var{pp} from" diff --git a/lily/pure-from-neighbor-engraver.cc b/lily/pure-from-neighbor-engraver.cc index 413bfe5215..1018dc54f6 100644 --- a/lily/pure-from-neighbor-engraver.cc +++ b/lily/pure-from-neighbor-engraver.cc @@ -124,12 +124,12 @@ Pure_from_neighbor_engraver::finalize () for (vsize k = 0; k < need_pure_heights_from_neighbors[pos[j]].size (); k++) - if (!in_same_column(need_pure_heights_from_neighbors[pos[j]][k], - pure_relevants_[i])) + if (!in_same_column (need_pure_heights_from_neighbors[pos[j]][k], + pure_relevants_[i])) Pointer_group_interface::add_grob - (need_pure_heights_from_neighbors[pos[j]][k], - ly_symbol2scm ("neighbors"), - pure_relevants_[i]); + (need_pure_heights_from_neighbors[pos[j]][k], + ly_symbol2scm ("neighbors"), + pure_relevants_[i]); } need_pure_heights_from_neighbors_.clear (); diff --git a/lily/repeat-acknowledge-engraver.cc b/lily/repeat-acknowledge-engraver.cc index 6ebb719994..6d3234c6c6 100644 --- a/lily/repeat-acknowledge-engraver.cc +++ b/lily/repeat-acknowledge-engraver.cc @@ -105,20 +105,17 @@ Repeat_acknowledge_engraver::process_music () s = robust_scm2string (get_property ("doubleRepeatSegnoType"), ":|S|:"); else // { segno, start } s = robust_scm2string (get_property ("startRepeatSegnoType"), ".S|:"); - else - if (end) // { segno, end } - s = robust_scm2string (get_property ("endRepeatSegnoType"), ":|S"); - else // { segno } - s = robust_scm2string (get_property ("segnoType"), "S"); - else - if (start) - if (end) // { start, end } - s = robust_scm2string (get_property ("doubleRepeatType"), ":|:"); - else // { start } - s = robust_scm2string (get_property ("startRepeatType"), "|:"); - else - if (end) // { end } - s = robust_scm2string (get_property ("endRepeatType"), ":|"); + else if (end) // { segno, end } + s = robust_scm2string (get_property ("endRepeatSegnoType"), ":|S"); + else // { segno } + s = robust_scm2string (get_property ("segnoType"), "S"); + else if (start) + if (end) // { start, end } + s = robust_scm2string (get_property ("doubleRepeatType"), ":|:"); + else // { start } + s = robust_scm2string (get_property ("startRepeatType"), "|:"); + else if (end) // { end } + s = robust_scm2string (get_property ("endRepeatType"), ":|"); /* TODO: line breaks might be allowed if we set whichBar to "". diff --git a/lily/rest-collision.cc b/lily/rest-collision.cc index 0e7a01c5a7..e2b0db5ef2 100644 --- a/lily/rest-collision.cc +++ b/lily/rest-collision.cc @@ -149,7 +149,6 @@ Rest_collision::calc_positioning_done (SCM smob) for (LEFT_and_RIGHT (d)) vector_sort (ordered_rests[d], rest_shift_less); - for (LEFT_and_RIGHT (d)) { if (ordered_rests[d].size () < 1) diff --git a/lily/rhythmic-music-iterator.cc b/lily/rhythmic-music-iterator.cc index 951c145ec8..b50122e8bb 100644 --- a/lily/rhythmic-music-iterator.cc +++ b/lily/rhythmic-music-iterator.cc @@ -59,10 +59,10 @@ Rhythmic_music_iterator::process (Moment m) SCM unlistened = SCM_EOL; for (; scm_is_pair (arts); arts = scm_cdr (arts)) { - SCM art = scm_car (arts); + SCM art = scm_car (arts); if (c->event_source ()->is_listened_class - (unsmob_stream_event (art)->get_property ("class"))) + (unsmob_stream_event (art)->get_property ("class"))) listened = scm_cons (art, listened); else unlistened = scm_cons (art, unlistened); diff --git a/lily/slur-engraver.cc b/lily/slur-engraver.cc index 0a36aa10f2..03f5a5c430 100644 --- a/lily/slur-engraver.cc +++ b/lily/slur-engraver.cc @@ -84,9 +84,9 @@ Slur_engraver::Slur_engraver () void Slur_engraver::derived_mark () const { - for (vsize i=start_events_.size(); i--;) + for (vsize i = start_events_.size (); i--;) scm_gc_mark (start_events_[i]->self_scm ()); - for (vsize i=stop_events_.size(); i--;) + for (vsize i = stop_events_.size (); i--;) scm_gc_mark (stop_events_[i]->self_scm ()); } @@ -204,7 +204,7 @@ Slur_engraver::process_music () for (vsize j = stop_events_.size (); --j > i;) { if (id == robust_scm2string (stop_events_[j]->get_property ("spanner-id"), "")) - stop_events_.erase (stop_events_.begin() + j); + stop_events_.erase (stop_events_.begin () + j); } } else @@ -242,10 +242,11 @@ Slur_engraver::process_music () Stream_event *c = unsmob_stream_event (slurs_[j]->get_property ("cause")); - if (!c) { - slurs_[j]->programming_error ("slur without a cause"); - continue; - } + if (!c) + { + slurs_[j]->programming_error ("slur without a cause"); + continue; + } Direction slur_dir = to_dir (c->get_property ("direction")); diff --git a/lily/spanner.cc b/lily/spanner.cc index eeff11bba7..af2ea7137f 100644 --- a/lily/spanner.cc +++ b/lily/spanner.cc @@ -328,7 +328,7 @@ Spanner::derived_mark () const for (LEFT_and_RIGHT (d)) if (spanned_drul_[d]) scm_gc_mark (spanned_drul_[d]->self_scm ()); - ; + ; for (vsize i = broken_intos_.size (); i--;) scm_gc_mark (broken_intos_[i]->self_scm ()); diff --git a/lily/staff-symbol-engraver.cc b/lily/staff-symbol-engraver.cc index 66ee8002a7..1ca6a4dce1 100644 --- a/lily/staff-symbol-engraver.cc +++ b/lily/staff-symbol-engraver.cc @@ -52,10 +52,11 @@ protected: void Staff_symbol_engraver::derived_mark () const { - for (LEFT_and_RIGHT (d)) { - if (span_events_[d]) - scm_gc_mark (span_events_[d]->self_scm ()); - } + for (LEFT_and_RIGHT (d)) + { + if (span_events_[d]) + scm_gc_mark (span_events_[d]->self_scm ()); + } } Staff_symbol_engraver::~Staff_symbol_engraver () diff --git a/lily/tie-formatting-problem.cc b/lily/tie-formatting-problem.cc index e2c3736f70..f514b39095 100644 --- a/lily/tie-formatting-problem.cc +++ b/lily/tie-formatting-problem.cc @@ -497,10 +497,10 @@ Tie_formatting_problem::generate_configuration (int pos, Direction dir, size. */ - Interval staff_span = - Staff_symbol_referencer::staff_span (details_.staff_symbol_referencer_); + Interval staff_span + = Staff_symbol_referencer::staff_span (details_.staff_symbol_referencer_); staff_span.widen (-1); - bool const within_staff = staff_span.contains(pos); + bool const within_staff = staff_span.contains (pos); if (head_positions_slice (columns[LEFT]).contains (pos) || head_positions_slice (columns[RIGHT]).contains (pos) || within_staff) @@ -721,8 +721,8 @@ Tie_formatting_problem::score_configuration (Tie_configuration *conf) const Real top_y = tip_y + conf->dir_ * height; Real top_pos = 2 * top_y / details_.staff_space_; Real round_top_pos = rint (top_pos); - Interval staff_span = - Staff_symbol_referencer::staff_span (details_.staff_symbol_referencer_); + Interval staff_span + = Staff_symbol_referencer::staff_span (details_.staff_symbol_referencer_); if (Staff_symbol_referencer::on_line (details_.staff_symbol_referencer_, int (round_top_pos)) && staff_span[UP] * 0.5 > top_y) diff --git a/lily/time-signature.cc b/lily/time-signature.cc index 082b62a93c..263817c708 100644 --- a/lily/time-signature.cc +++ b/lily/time-signature.cc @@ -72,7 +72,7 @@ Time_signature::print (SCM smob) Real pos = linepos.front (); Real dist = fabs (pos - mid); for (std::vector::const_iterator - i = linepos.begin (), e = linepos.end (); + i = linepos.begin (), e = linepos.end (); ++i != e;) { double const d = fabs (*i - mid); @@ -84,7 +84,7 @@ Time_signature::print (SCM smob) } m.translate_axis - (pos * Staff_symbol_referencer::staff_space (me) / 2, Y_AXIS); + (pos * Staff_symbol_referencer::staff_space (me) / 2, Y_AXIS); } } diff --git a/lily/tweak-engraver.cc b/lily/tweak-engraver.cc index d1c3c240a4..d6fb785522 100644 --- a/lily/tweak-engraver.cc +++ b/lily/tweak-engraver.cc @@ -49,13 +49,15 @@ Tweak_engraver::acknowledge_grob (Grob_info info) for (SCM s = ev->get_property ("tweaks"); scm_is_pair (s); s = scm_cdr (s)) { - if (scm_is_pair (scm_caar (s))) { - if (SCM_UNBNDP (grobname)) - grobname = scm_from_locale_symbol (info.grob ()->name ().c_str ()); - if (scm_is_eq (scm_caaar (s), grobname)) - info.grob ()->set_property (scm_cdaar (s), scm_cdar (s)); - } else if (direct) - info.grob ()->set_property (scm_caar (s), scm_cdar (s)); + if (scm_is_pair (scm_caar (s))) + { + if (SCM_UNBNDP (grobname)) + grobname = scm_from_locale_symbol (info.grob ()->name ().c_str ()); + if (scm_is_eq (scm_caaar (s), grobname)) + info.grob ()->set_property (scm_cdaar (s), scm_cdar (s)); + } + else if (direct) + info.grob ()->set_property (scm_caar (s), scm_cdar (s)); } } } -- 2.39.5