X-Git-Url: https://git.donarmstrong.com/?a=blobdiff_plain;f=lily%2Fstaff-symbol-engraver.cc;h=509f86184a280b53bd2e6ab96bf7e5571bc00942;hb=6bd338aabccfa9d9d1a41f60cddef6285edb6395;hp=e5d981b04e28230e39a392b266d9aceb9284b49f;hpb=55ac733b69643a6bc6a83b706c65cb56efd388ef;p=lilypond.git diff --git a/lily/staff-symbol-engraver.cc b/lily/staff-symbol-engraver.cc index e5d981b04e..509f86184a 100644 --- a/lily/staff-symbol-engraver.cc +++ b/lily/staff-symbol-engraver.cc @@ -1,7 +1,7 @@ /* This file is part of LilyPond, the GNU music typesetter. - Copyright (C) 1997--2011 Han-Wen Nienhuys + Copyright (C) 1997--2012 Han-Wen Nienhuys LilyPond is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by @@ -50,7 +50,11 @@ protected: Staff_symbol_engraver::~Staff_symbol_engraver () { - assert (!span_); + if (span_) + { + // Somehow finalize() was not called? + programming_error ("Have a pending spanner in destructor."); + } } Staff_symbol_engraver::Staff_symbol_engraver () @@ -80,7 +84,7 @@ Staff_symbol_engraver::process_music () finished_span_ = span_; span_ = 0; if (first_start_) - first_start_ = false; + first_start_ = false; } if (span_events_[START] @@ -95,7 +99,7 @@ Staff_symbol_engraver::start_spanner () { span_ = make_spanner ("StaffSymbol", SCM_EOL); span_->set_bound (LEFT, - unsmob_grob (get_property ("currentCommandColumn"))); + unsmob_grob (get_property ("currentCommandColumn"))); } } @@ -109,9 +113,9 @@ Staff_symbol_engraver::stop_spanner () finished_span_->set_bound (RIGHT, unsmob_grob (get_property ("currentCommandColumn"))); announce_end_grob (finished_span_, - span_events_[STOP] - ? span_events_[STOP]->self_scm () - : SCM_EOL); + span_events_[STOP] + ? span_events_[STOP]->self_scm () + : SCM_EOL); finished_span_ = 0; } @@ -151,15 +155,15 @@ Staff_symbol_engraver::acknowledge_grob (Grob_info s) ADD_ACKNOWLEDGER (Staff_symbol_engraver, grob); ADD_TRANSLATOR (Staff_symbol_engraver, - /* doc */ - "Create the constellation of five (default) staff lines.", + /* doc */ + "Create the constellation of five (default) staff lines.", - /* create */ - "StaffSymbol ", + /* create */ + "StaffSymbol ", - /* read */ - "", + /* read */ + "", - /* write */ - "" - ); + /* write */ + "" + );