X-Git-Url: https://git.donarmstrong.com/?a=blobdiff_plain;f=flower%2Finclude%2Fdirection.hh;h=f3b31e3811a7c5245c294cbd72322b9dc3cd184d;hb=47db9a3883d726ca53e2133a3b2298f78dd6a32e;hp=6fe5efcc19c8f446ebd16e63584dd146f056c8da;hpb=f93e4199873c91ae32f0e84a610d14853dc379df;p=lilypond.git diff --git a/flower/include/direction.hh b/flower/include/direction.hh index 6fe5efcc19..f3b31e3811 100644 --- a/flower/include/direction.hh +++ b/flower/include/direction.hh @@ -1,7 +1,7 @@ /* This file is part of LilyPond, the GNU music typesetter. - Copyright (C) 1997--2011 Han-Wen Nienhuys + Copyright (C) 1997--2015 Han-Wen Nienhuys LilyPond is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by @@ -60,7 +60,7 @@ operator - (Direction const d) return other_dir (d); } -// huh? +// to be deleted soon (after coping with issues 2491 and 2493 inline Direction flip (Direction *i) { @@ -71,6 +71,15 @@ flip (Direction *i) return *i; } +#define UP_and_DOWN(d) \ + Direction d = UP; d != CENTER; d = (d == UP ? DOWN : CENTER) + +#define DOWN_and_UP(d) \ + Direction d = DOWN; d != CENTER; d = (d == DOWN ? UP : CENTER) + +#define LEFT_and_RIGHT(d) \ + Direction d = LEFT; d != CENTER; d = (d == LEFT ? RIGHT : CENTER) + /** if d > 0: the max operator if d < 0: the min operator