summaryrefslogtreecommitdiff
path: root/apps/plugins/chessbox/gnuchess.c
diff options
context:
space:
mode:
authorThomas Martitz <kugel@rockbox.org>2009-08-03 01:38:58 +0000
committerThomas Martitz <kugel@rockbox.org>2009-08-03 01:38:58 +0000
commit85ece84b1c955e2304e8519eb40ad8212a32a3ba (patch)
tree2b70dd38cfa86f04028556eaaeff383e3afc381e /apps/plugins/chessbox/gnuchess.c
parentaf6060a987a2ad6ecdf62eb6b13dca61d65d7318 (diff)
downloadrockbox-85ece84b1c955e2304e8519eb40ad8212a32a3ba.tar.gz
rockbox-85ece84b1c955e2304e8519eb40ad8212a32a3ba.zip
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
Diffstat (limited to 'apps/plugins/chessbox/gnuchess.c')
-rw-r--r--apps/plugins/chessbox/gnuchess.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/apps/plugins/chessbox/gnuchess.c b/apps/plugins/chessbox/gnuchess.c
index b8fef724fc..5c30c6a6df 100644
--- a/apps/plugins/chessbox/gnuchess.c
+++ b/apps/plugins/chessbox/gnuchess.c
@@ -60,7 +60,7 @@
60#define maxdepth 30 60#define maxdepth 30
61#define true 1 61#define true 1
62#define false 0 62#define false 0
63#define absv(x) ((x) < 0 ? -(x) : (x)) 63#define absv(x) (ABS(x))
64#define taxicab(a,b) (abs(column[a]-column[b]) + abs(row[a]-row[b])) 64#define taxicab(a,b) (abs(column[a]-column[b]) + abs(row[a]-row[b]))
65 65
66/* ---- Chess datatypes and variables ---- */ 66/* ---- Chess datatypes and variables ---- */