lilypond-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Macro for(UP_and_DOWN) and 3 similar. (issue 2491) (issue 6109046)


From: k-ohara5a5a
Subject: Macro for(UP_and_DOWN) and 3 similar. (issue 2491) (issue 6109046)
Date: Tue, 24 Apr 2012 03:32:28 +0000

Looks good to me,
but I suggest you also solve the bug you found (issue 2493) in this
patch but preferably as a separate commit.
Then you can convert all the loops.


http://codereview.appspot.com/6109046/diff/1/flower/include/direction.hh
File flower/include/direction.hh (right):

http://codereview.appspot.com/6109046/diff/1/flower/include/direction.hh#newcode63
flower/include/direction.hh:63: // huh?
If you replace *all* the while(flip()) loops, you can remove the flip
function, which is merely object-oriented obfuscation for the unary
minus operator.

http://codereview.appspot.com/6109046/diff/1/lily/ledger-line-spanner.cc
File lily/ledger-line-spanner.cc (right):

http://codereview.appspot.com/6109046/diff/1/lily/ledger-line-spanner.cc#newcode52
lily/ledger-line-spanner.cc:52: + current_extents[d].length ();
This was mentioned as suspicious in the email, but it looks okay to me.

http://codereview.appspot.com/6109046/diff/1/lily/ledger-line-spanner.cc#newcode68
lily/ledger-line-spanner.cc:68: while (flip (&d) != DOWN);
Possibly you have found the cause for
<http://code.google.com/p/lilypond/issues/detail?id=2493>

One nice thing about your macro (or a loop with both conditions in one
place) is that it helps to avoid this type of mistake.

http://codereview.appspot.com/6109046/



reply via email to

[Prev in Thread] Current Thread [Next in Thread]