diff options
author | Paul Davis <paul@linuxaudiosystems.com> | 2013-04-04 18:45:27 -0400 |
---|---|---|
committer | Paul Davis <paul@linuxaudiosystems.com> | 2013-04-04 18:45:27 -0400 |
commit | 19bd6419157119b976393a0c5966b4be4c962119 (patch) | |
tree | bf27f7ea6402f39a0f3744ed6b298d91ed7f7c0e /libs/canvas/types.cc | |
parent | aaea166135ace01709f7e0be64f40be80f4107ec (diff) |
commit immediately post linking
Diffstat (limited to 'libs/canvas/types.cc')
-rw-r--r-- | libs/canvas/types.cc | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/libs/canvas/types.cc b/libs/canvas/types.cc index 02ab77e000..56312741cf 100644 --- a/libs/canvas/types.cc +++ b/libs/canvas/types.cc @@ -10,10 +10,10 @@ Coord const ArdourCanvas::COORD_MAX = DBL_MAX; /* XXX: empirically arrived at */ Coord const ArdourCanvas::CAIRO_MAX = 65536; -Coord -ArdourCanvas::safe_add (Coord a, Coord b) +static inline Coord +safe_add (Coord a, Coord b) { - if (a == COORD_MAX || b == COORD_MAX) { + if (((COORD_MAX - a) > b) || ((COORD_MAX - b) > a)) { return COORD_MAX; } |