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 (); ...
11 years, 11 months ago
(2012-05-21 05:55:18 UTC)
#1
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.
Issue 6215069: Fix 2546: Prefix incrementers may be preferred for
(Closed)
Created 11 years, 11 months ago by Colin Campbell
Modified 11 years, 3 months ago
Reviewers: Keith
Base URL:
Comments: 1