From 85ece84b1c955e2304e8519eb40ad8212a32a3ba Mon Sep 17 00:00:00 2001 From: Thomas Martitz Date: Mon, 3 Aug 2009 01:38:58 +0000 Subject: Remove various ABS() definitions with a single one using typeof (if using gcc) to avoid multiple evaluations of the input expressions. Speex still uses its own as I didn't want to change this imported code too much. git-svn-id: svn://svn.rockbox.org/rockbox/trunk@22129 a1c6a512-1295-4272-9138-f99709370657 --- apps/gui/pitchscreen.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'apps/gui/pitchscreen.c') diff --git a/apps/gui/pitchscreen.c b/apps/gui/pitchscreen.c index 8215da2a97..78d049be10 100644 --- a/apps/gui/pitchscreen.c +++ b/apps/gui/pitchscreen.c @@ -23,6 +23,7 @@ #include #include #include +#include /* for ABS() */ #include "config.h" #include "sprintf.h" #include "action.h" @@ -42,8 +43,6 @@ #include "tdspeed.h" #endif -#define ABS(x) ((x) > 0 ? (x) : -(x)) - #define ICON_BORDER 12 /* icons are currently 7x8, so add ~2 pixels */ /* on both sides when drawing */ -- cgit v1.2.2