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:
parent
9ae9a18de9
commit
6ee34cb53b
1 changed files with 5 additions and 2 deletions
|
@ -1081,8 +1081,11 @@ void setvol(void)
|
||||||
* Helper function to convert a string of 6 hex digits to a native colour
|
* Helper function to convert a string of 6 hex digits to a native colour
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#define hex2dec(c) (((c) >= '0' && ((c) <= '9')) ? (toupper(c)) - '0' : \
|
static int hex2dec(int c)
|
||||||
(toupper(c)) - 'A' + 10)
|
{
|
||||||
|
return (((c) >= '0' && ((c) <= '9')) ? (toupper(c)) - '0' :
|
||||||
|
(toupper(c)) - 'A' + 10);
|
||||||
|
}
|
||||||
|
|
||||||
int hex_to_rgb(const char* hex)
|
int hex_to_rgb(const char* hex)
|
||||||
{ int ok = 1;
|
{ int ok = 1;
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue