diff options
author | Robin Watts <robin.watts@artifex.com> | 2012-07-05 16:56:32 +0100 |
---|---|---|
committer | Robin Watts <robin.watts@artifex.com> | 2012-07-05 17:05:08 +0100 |
commit | ee382eb9e03bd609bc0da95a77e7b7232d7e56d5 (patch) | |
tree | 6485a2e7144657a992c43f445fff6551ca827b5a /pdf/pdf_parse.c | |
parent | 8ff2db02dba00a0fbc53ee4c89dcab60aab181ec (diff) | |
download | mupdf-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 'pdf/pdf_parse.c')
-rw-r--r-- | pdf/pdf_parse.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/pdf/pdf_parse.c b/pdf/pdf_parse.c index 5018844c..0ba6b0a4 100644 --- a/pdf/pdf_parse.c +++ b/pdf/pdf_parse.c @@ -9,10 +9,10 @@ pdf_to_rect(fz_context *ctx, pdf_obj *array) float b = pdf_to_real(pdf_array_get(array, 1)); float c = pdf_to_real(pdf_array_get(array, 2)); float d = pdf_to_real(pdf_array_get(array, 3)); - r.x0 = MIN(a, c); - r.y0 = MIN(b, d); - r.x1 = MAX(a, c); - r.y1 = MAX(b, d); + r.x0 = fz_min(a, c); + r.y0 = fz_min(b, d); + r.x1 = fz_max(a, c); + r.y1 = fz_max(b, d); return r; } |