diff options
author | Tor Andersson <tor.andersson@artifex.com> | 2011-04-08 13:49:11 +0200 |
---|---|---|
committer | Tor Andersson <tor.andersson@artifex.com> | 2011-04-08 13:49:11 +0200 |
commit | 94e774a8bd2891f36885ae710efd42caebd855ed (patch) | |
tree | 883147e1bf5dc8feba5d142b8ffcde8e7e0676f6 /fitz/filt_basic.c | |
parent | a1b5f023ccebd339e9a74ef7f3bcc94c0c74d3e0 (diff) | |
download | mupdf-94e774a8bd2891f36885ae710efd42caebd855ed.tar.xz |
Remove inline keyword where it is not strictly necessary for performance.
Also put the function on the same line for inline functions, so
they stick out and are easy to find with grep.
Diffstat (limited to 'fitz/filt_basic.c')
-rw-r--r-- | fitz/filt_basic.c | 15 |
1 files changed, 6 insertions, 9 deletions
diff --git a/fitz/filt_basic.c b/fitz/filt_basic.c index 391f06ab..feb13076 100644 --- a/fitz/filt_basic.c +++ b/fitz/filt_basic.c @@ -75,14 +75,11 @@ static inline int ishex(int a) (a >= '0' && a <= '9'); } -static inline int from_hex(int a) +static inline int unhex(int a) { - if (a >= 'A' && a <= 'F') - return a - 'A' + 0xA; - if (a >= 'a' && a <= 'f') - return a - 'a' + 0xA; - if (a >= '0' && a <= '9') - return a - '0'; + if (a >= 'A' && a <= 'F') return a - 'A' + 0xA; + if (a >= 'a' && a <= 'f') return a - 'a' + 0xA; + if (a >= '0' && a <= '9') return a - '0'; return 0; } @@ -109,12 +106,12 @@ read_ahxd(fz_stream *stm, unsigned char *buf, int len) { if (!odd) { - a = from_hex(c); + a = unhex(c); odd = 1; } else { - b = from_hex(c); + b = unhex(c); *p++ = (a << 4) | b; odd = 0; } |