[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: line_count fixes (issue 6211047)
From: |
k-ohara5a5a |
Subject: |
Re: line_count fixes (issue 6211047) |
Date: |
Wed, 23 May 2012 05:44:49 +0000 |
Looks good to me.
The regtest changes look like improvements,
although I wonder if the time-signature and repeat dots should simply
center around the line closest to zero. If a user sets his
line-positions entirely below zero, he might /want/ the time-signature
above his staff lines. Why else would he set his line-positions below
zero, when he will be using a non-standard clef placement anyway ?
http://codereview.appspot.com/6211047/diff/6001/lily/breathing-sign.cc
File lily/breathing-sign.cc (right):
http://codereview.appspot.com/6211047/diff/6001/lily/breathing-sign.cc#newcode86
lily/breathing-sign.cc:86: for (Direction i = DOWN;
Somebody recently standardized these loops to use a macro,
for(UP_and_DOWN(i)), issue 2491, so use that macro.
http://codereview.appspot.com/6211047/diff/6001/lily/time-signature.cc
File lily/time-signature.cc (right):
http://codereview.appspot.com/6211047/diff/6001/lily/time-signature.cc#newcode77
lily/time-signature.cc:77: --it;
The STL makes code very easy to read, doesn't it? Without it, we would
have to write:
Real mid = staff->staff_span().center();
Real closest = linepos[0];
for (int i=0; i<linepos.size(); i++)
if (fabs(linepos[i] - mid) < fabs(closest - mid))
closest = linepos[i];
http://codereview.appspot.com/6211047/