diff options
| author | Dave Chapman <dave@dchapman.com> | 2008-03-15 11:12:16 +0000 |
|---|---|---|
| committer | Dave Chapman <dave@dchapman.com> | 2008-03-15 11:12:16 +0000 |
| commit | 6ee34cb53b487da8167821e01975a77be3a42f9e (patch) | |
| tree | 362872b86c9861087cad1e9cddb950ee5fe192e4 /apps/misc.c | |
| parent | 9ae9a18de9c9fb5379444162aa5f4d1395a323da (diff) | |
| download | rockbox-6ee34cb53b487da8167821e01975a77be3a42f9e.zip rockbox-6ee34cb53b487da8167821e01975a77be3a42f9e.tar.gz rockbox-6ee34cb53b487da8167821e01975a77be3a42f9e.tar.bz2 rockbox-6ee34cb53b487da8167821e01975a77be3a42f9e.tar.xz | |
Small bin-size optimisation - convert a macro used six times to a function
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@16675 a1c6a512-1295-4272-9138-f99709370657
Diffstat (limited to 'apps/misc.c')
| -rw-r--r-- | apps/misc.c | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/apps/misc.c b/apps/misc.c index 9b8c9a7..daf9471 100644 --- a/apps/misc.c +++ b/apps/misc.c @@ -1081,8 +1081,11 @@ void setvol(void) * Helper function to convert a string of 6 hex digits to a native colour */ -#define hex2dec(c) (((c) >= '0' && ((c) <= '9')) ? (toupper(c)) - '0' : \ - (toupper(c)) - 'A' + 10) +static int hex2dec(int c) +{ + return (((c) >= '0' && ((c) <= '9')) ? (toupper(c)) - '0' : + (toupper(c)) - 'A' + 10); +} int hex_to_rgb(const char* hex) { int ok = 1; |