From: Han-Wen Nienhuys Date: Mon, 7 Feb 2011 15:16:41 +0000 (-0200) Subject: Implement minmax() X-Git-Tag: release/2.13.49-1~1^2~5 X-Git-Url: https://git.donarmstrong.com/?a=commitdiff_plain;h=fd3857da3d3f6a8ec80184d48a6ca0bd48d23091;p=lilypond.git Implement minmax() --- diff --git a/flower/include/direction.hh b/flower/include/direction.hh index 0ba482fe2c..befd0aa2ac 100644 --- a/flower/include/direction.hh +++ b/flower/include/direction.hh @@ -75,7 +75,13 @@ flip (Direction *i) if d > 0: the max operator if d < 0: the min operator */ -template T minmax (Direction d, T, T); +template T minmax (Direction d, T a, T b) +{ + if (d == UP) + return max (a, b); + else + return min (a, b); +} // String direction_string (Direction, Axis);