On 15 April 2012 16:49, David Kastrup
<address@hidden> wrote:
Łukasz Czerwiński <
address@hidden> writes:
> I'd like to write code, that will make Lilypond better or easier to be
> used
Not necessarily the same as "the C++ way".
Right :) No iterators needed here :)
> and it's not my goal to fulfill my ambitions to force unwanted
> changes, so:
>
> 1) As Graham and Keith wanted for(UP_and_DOWN), the macro and example
> is:
>
> #define UP_and_DOWN(d) \
> Direction d = UP; d != CENTER; flip(&d), d == UP ? d = CENTER : d
That looks rather nonsensical. Why use flip at all here, and what with
the obscure : d as a nop? You could write
; d = d == UP ? DOWN : CENTER ;
Yeah, you're absolutely right, that way is simpler, thanks :)
Łukasz