lilypond-devel
[Top][All Lists]
Advanced

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

Fix 2546: Prefix incrementers may be preferred for (issue 6215069)


From: k-ohara5a5a
Subject: Fix 2546: Prefix incrementers may be preferred for (issue 6215069)
Date: Mon, 21 May 2012 05:55:18 +0000

Yuck, but harmless.


http://codereview.appspot.com/6215069/diff/1/lily/tie-engraver.cc
File lily/tie-engraver.cc (right):

http://codereview.appspot.com/6215069/diff/1/lily/tie-engraver.cc#newcode240
lily/tie-engraver.cc:240: for (; it != heads_to_tie_.end (); ++it)
The vector iterator supports < and that makes a more-recognizable loop
idiom, but I guess != would work as well.

The post-fix version is more common in loops so humans read it more
quickly.  I guess the pre-fix version promises makes it easier for the
compiler to see we don't need the value before the increment.  Humans
are more important than compilers.

http://codereview.appspot.com/6215069/



reply via email to

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