diff options
author | Thomas Martitz <kugel@rockbox.org> | 2009-09-25 18:36:18 +0000 |
---|---|---|
committer | Thomas Martitz <kugel@rockbox.org> | 2009-09-25 18:36:18 +0000 |
commit | d045f59989137afc5e9138277bcb24dcfc4c5f3f (patch) | |
tree | 2e3313a15bdf24658f527478dd0511de1cf90368 /apps/gui/skin_engine/skin_parser.c | |
parent | bcd890d7bbac710dcdb1d29e2805989e27f55484 (diff) | |
download | rockbox-d045f59989137afc5e9138277bcb24dcfc4c5f3f.tar.gz rockbox-d045f59989137afc5e9138277bcb24dcfc4c5f3f.zip |
Redo 22825 but this time with caring about alignment.
Change coordinate members in struct skin_albumart to ints. That alone gives a tiny binsize decrease.
Change the struct layout (some reordering) to enable more efficient alignment which reclaims 4 of the 8 bytes. Since there's usually only 1 aa struct this should be a net gain.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@22835 a1c6a512-1295-4272-9138-f99709370657
Diffstat (limited to 'apps/gui/skin_engine/skin_parser.c')
-rw-r--r-- | apps/gui/skin_engine/skin_parser.c | 13 |
1 files changed, 2 insertions, 11 deletions
diff --git a/apps/gui/skin_engine/skin_parser.c b/apps/gui/skin_engine/skin_parser.c index ede1871414..b03bdb013d 100644 --- a/apps/gui/skin_engine/skin_parser.c +++ b/apps/gui/skin_engine/skin_parser.c | |||
@@ -983,18 +983,9 @@ static int parse_albumart_load(const char *wps_bufptr, | |||
983 | return WPS_ERROR_INVALID_PARAM; /* malformed token: e.g. %Cl7 */ | 983 | return WPS_ERROR_INVALID_PARAM; /* malformed token: e.g. %Cl7 */ |
984 | 984 | ||
985 | _pos = wps_bufptr + 1; | 985 | _pos = wps_bufptr + 1; |
986 | if (!isdigit(*_pos)) | 986 | _pos = parse_list("dd", NULL, '|', _pos, &aa->albumart_x, &aa->albumart_y); |
987 | return WPS_ERROR_INVALID_PARAM; /* malformed token: e.g. %Cl|@ */ | ||
988 | aa->albumart_x = atoi(_pos); | ||
989 | 987 | ||
990 | _pos = strchr(_pos, '|'); | 988 | if (!_pos || _pos > newline || *_pos != '|') |
991 | if (!_pos || _pos > newline || !isdigit(*(++_pos))) | ||
992 | return WPS_ERROR_INVALID_PARAM; /* malformed token: e.g. %Cl|7\n or %Cl|7|@ */ | ||
993 | |||
994 | aa->albumart_y = atoi(_pos); | ||
995 | |||
996 | _pos = strchr(_pos, '|'); | ||
997 | if (!_pos || _pos > newline) | ||
998 | return WPS_ERROR_INVALID_PARAM; /* malformed token: no | after y coordinate | 989 | return WPS_ERROR_INVALID_PARAM; /* malformed token: no | after y coordinate |
999 | e.g. %Cl|7|59\n */ | 990 | e.g. %Cl|7|59\n */ |
1000 | 991 | ||