[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: First step towards fixing the cross staff problem (issue4430063)
From: |
hanwenn |
Subject: |
Re: First step towards fixing the cross staff problem (issue4430063) |
Date: |
Sun, 24 Apr 2011 13:41:49 +0000 |
http://codereview.appspot.com/4430063/diff/1/lily/beam-collision-engraver.cc
File lily/beam-collision-engraver.cc (right):
http://codereview.appspot.com/4430063/diff/1/lily/beam-collision-engraver.cc#newcode95
lily/beam-collision-engraver.cc:95: // First, find the staves to which
any covered grob may belong
this is weird; why dont you extract the list of staves directly from
stems ?
http://codereview.appspot.com/4430063/diff/1/lily/beam-collision-engraver.cc#newcode102
lily/beam-collision-engraver.cc:102: staff_symbols.insert
(Staff_symbol_referencer::get_staff_symbol (covered_grob));
This is unidiomatic: it's better to use the originating staff context
for this, as that is translation information rather than backend info .
This implementation will stop working if somebody removes
Staff_symbol_engraver.
maybe add a TODO about this.
http://codereview.appspot.com/4430063/diff/1/lily/beam-collision-engraver.cc#newcode119
lily/beam-collision-engraver.cc:119: for (it = staff_symbols.begin ();
it != staff_symbols.end (); it++)
why a loop?
you can do
staff_symbols.find(Staff_referencer::get_staff_sym(covered))
http://codereview.appspot.com/4430063/