On 2015/01/02 07:21:19, benko.pal wrote:
On 2015/01/01 23:08:56, Dan Eble wrote:
> On 2015/01/01 22:57:31, benko.pal wrote:
> >
https://codereview.appspot.com/189420043/diff/1/lily/breathing-sign.cc
> > File lily/breathing-sign.cc (right):
> >
> >
>

https://codereview.appspot.com/189420043/diff/1/lily/breathing-sign.cc#newcode122
> > lily/breathing-sign.cc:122: if (ydim[DOWN] < val && line_pos.begin
() < it -
> 1)
> > I'd rather write
> > line_pos.begin () + 1 < it
> > but good catch anyway, thanks!
>
> I also find the whole surrounding code difficult to read, but I
don't want to
> spend any more time on this than I have to.  Thanks for the
feedback.

your code is fine, I withdraw my suggestion (I should never hurry a
review).
thanks again!

Actually, all of those checks (existing and proposed) look like
undefined behavior since they calculate a possibly non-existing iterator
and compare with it.  With most compilers and implementations things
will probably work, but one can't really rely on it.  In particular, the
compiler is allowed to make line_pos.begin () < whatever the same as
line_pos.begin () != whatever.

https://codereview.appspot.com/189420043/

_______________________________________________
lilypond-devel mailing list
lilypond-devel@gnu.org
https://lists.gnu.org/mailman/listinfo/lilypond-devel

Reply via email to