X-Git-Url: https://git.donarmstrong.com/?a=blobdiff_plain;f=lily%2Fgrid-line-span-engraver.cc;h=ad80c9ea7ee51134e3f54c72a559b212caec4dc3;hb=cf3642858a2340bb39ee56739f34c799946d4454;hp=b6a96ab8f76f5dd2a32f167833e978411a2f0643;hpb=7f6816438d66f6d70db5b68454d80656a0f3f131;p=lilypond.git diff --git a/lily/grid-line-span-engraver.cc b/lily/grid-line-span-engraver.cc index b6a96ab8f7..ad80c9ea7e 100644 --- a/lily/grid-line-span-engraver.cc +++ b/lily/grid-line-span-engraver.cc @@ -1,10 +1,20 @@ /* - grid-line-span-engraver.cc -- implement Grid_line_span_engraver + This file is part of LilyPond, the GNU music typesetter. - source file of the GNU LilyPond music typesetter + Copyright (C) 2005--2011 Han-Wen Nienhuys - (c) 2005 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 + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + LilyPond is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with LilyPond. If not, see . */ #include "engraver.hh" @@ -14,12 +24,12 @@ class Grid_line_span_engraver : public Engraver { Item *spanline_; - Link_array lines_; + vector lines_; public: TRANSLATOR_DECLARATIONS (Grid_line_span_engraver); protected: - DECLARE_ACKNOWLEDGER(grid_point); + DECLARE_ACKNOWLEDGER (grid_point); void stop_translation_timestep (); }; @@ -35,7 +45,7 @@ Grid_line_span_engraver::acknowledge_grid_point (Grob_info i) if (depth) { Item *it = dynamic_cast (i.grob ()); - lines_.push (it); + lines_.push_back (it); if (lines_.size () >= 2 && !spanline_) { @@ -50,20 +60,27 @@ Grid_line_span_engraver::stop_translation_timestep () { if (spanline_) { - for (int i = 0; i < lines_.size (); i++) + for (vsize i = 0; i < lines_.size (); i++) Grid_line_interface::add_grid_point (spanline_, lines_[i]); spanline_ = 0; } - lines_.set_size (0); + lines_.resize (0); } #include "translator.icc" -ADD_ACKNOWLEDGER(Grid_line_span_engraver, grid_point); +ADD_ACKNOWLEDGER (Grid_line_span_engraver, grid_point); ADD_TRANSLATOR (Grid_line_span_engraver, - /* descr */ "This engraver makes cross-staff linelines: It catches all normal " - "line lines, and draws a single span-line across them.", - /* creats*/ "GridLine", - /* accepts */ "", - /* reads */ "", - /* write */ ""); + /* doc */ + "This engraver makes cross-staff lines: It catches all normal" + " lines and draws a single span line across them.", + + /* create */ + "GridLine ", + + /* read */ + "", + + /* write */ + "" + );