1
0
Fork 0
forked from len0rd/rockbox

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
This commit is contained in:
Dave Chapman 2008-03-15 11:12:16 +00:00
parent 9ae9a18de9
commit 6ee34cb53b

View file

@ -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;