summaryrefslogtreecommitdiff
path: root/fitz/filt_predict.c
diff options
context:
space:
mode:
authorRobin Watts <robin.watts@artifex.com>2012-07-05 16:56:32 +0100
committerRobin Watts <robin.watts@artifex.com>2012-07-05 17:05:08 +0100
commitee382eb9e03bd609bc0da95a77e7b7232d7e56d5 (patch)
tree6485a2e7144657a992c43f445fff6551ca827b5a /fitz/filt_predict.c
parent8ff2db02dba00a0fbc53ee4c89dcab60aab181ec (diff)
downloadmupdf-ee382eb9e03bd609bc0da95a77e7b7232d7e56d5.tar.xz
Move to static inline functions from macros.
Instead of using macros for min/max/abs/clamp, we move to using inline functions. These are more typesafe, and should produce equivalent code on compilers that support inline (i.e. pretty much everything we care about these days). People can always do their own macro versions if they prefer.
Diffstat (limited to 'fitz/filt_predict.c')
-rw-r--r--fitz/filt_predict.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/fitz/filt_predict.c b/fitz/filt_predict.c
index ebd712fd..b82c1281 100644
--- a/fitz/filt_predict.c
+++ b/fitz/filt_predict.c
@@ -52,9 +52,9 @@ static inline int paeth(int a, int b, int c)
{
/* The definitions of ac and bc are correct, not a typo. */
int ac = b - c, bc = a - c, abcc = ac + bc;
- int pa = ABS(ac);
- int pb = ABS(bc);
- int pc = ABS(abcc);
+ int pa = fz_absi(ac);
+ int pb = fz_absi(bc);
+ int pc = fz_absi(abcc);
return pa <= pb && pa <= pc ? a : pb <= pc ? b : c;
}