diff options
author | Björn Stenberg <bjorn@haxx.se> | 2011-10-15 19:35:02 +0000 |
---|---|---|
committer | Björn Stenberg <bjorn@haxx.se> | 2011-10-15 19:35:02 +0000 |
commit | 0942e2a0f71d809c1d7f2606cbddfa1d4beacb87 (patch) | |
tree | ce2fbdea468cb8223598c546fee765a10660a0b0 /apps/gui/skin_engine | |
parent | f301ac05f9dd6ace2355fa822bd61d454c2c4f28 (diff) | |
download | rockbox-0942e2a0f71d809c1d7f2606cbddfa1d4beacb87.tar.gz rockbox-0942e2a0f71d809c1d7f2606cbddfa1d4beacb87.zip |
Changed the FOR_NB_SCREENS macro to always be a for loop that declares its own loop variable. This removes the need to declare this variable in the outer scope.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@30756 a1c6a512-1295-4272-9138-f99709370657
Diffstat (limited to 'apps/gui/skin_engine')
-rw-r--r-- | apps/gui/skin_engine/skin_backdrops.c | 7 | ||||
-rw-r--r-- | apps/gui/skin_engine/skin_display.c | 1 | ||||
-rw-r--r-- | apps/gui/skin_engine/skin_engine.c | 7 |
3 files changed, 5 insertions, 10 deletions
diff --git a/apps/gui/skin_engine/skin_backdrops.c b/apps/gui/skin_engine/skin_backdrops.c index 4701f51b19..5d98e29128 100644 --- a/apps/gui/skin_engine/skin_backdrops.c +++ b/apps/gui/skin_engine/skin_backdrops.c | |||
@@ -46,10 +46,9 @@ static int current_lcd_backdrop[NB_SCREENS]; | |||
46 | 46 | ||
47 | static int buflib_move_callback(int handle, void* current, void* new) | 47 | static int buflib_move_callback(int handle, void* current, void* new) |
48 | { | 48 | { |
49 | int i; | ||
50 | if (handle == handle_being_loaded) | 49 | if (handle == handle_being_loaded) |
51 | return BUFLIB_CB_CANNOT_MOVE; | 50 | return BUFLIB_CB_CANNOT_MOVE; |
52 | for (i=0; i<NB_BDROPS; i++) | 51 | for (int i=0; i<NB_BDROPS; i++) |
53 | { | 52 | { |
54 | if (backdrops[i].buffer == current) | 53 | if (backdrops[i].buffer == current) |
55 | { | 54 | { |
@@ -65,9 +64,7 @@ static struct buflib_callbacks buflib_ops = {buflib_move_callback, NULL}; | |||
65 | static bool first_go = true; | 64 | static bool first_go = true; |
66 | void skin_backdrop_init(void) | 65 | void skin_backdrop_init(void) |
67 | { | 66 | { |
68 | int i; | 67 | for (int i=0; i<NB_BDROPS; i++) |
69 | |||
70 | for (i=0; i<NB_BDROPS; i++) | ||
71 | { | 68 | { |
72 | if (first_go) | 69 | if (first_go) |
73 | backdrops[i].buflib_handle = -1; | 70 | backdrops[i].buflib_handle = -1; |
diff --git a/apps/gui/skin_engine/skin_display.c b/apps/gui/skin_engine/skin_display.c index f7a0888afc..95e4310de9 100644 --- a/apps/gui/skin_engine/skin_display.c +++ b/apps/gui/skin_engine/skin_display.c | |||
@@ -692,7 +692,6 @@ int skin_wait_for_action(enum skinnable_screens skin, int context, int timeout) | |||
692 | (void)skin; /* silence charcell warning */ | 692 | (void)skin; /* silence charcell warning */ |
693 | int button = ACTION_NONE; | 693 | int button = ACTION_NONE; |
694 | #ifdef HAVE_LCD_BITMAP | 694 | #ifdef HAVE_LCD_BITMAP |
695 | int i; | ||
696 | /* when the peak meter is enabled we want to have a | 695 | /* when the peak meter is enabled we want to have a |
697 | few extra updates to make it look smooth. On the | 696 | few extra updates to make it look smooth. On the |
698 | other hand we don't want to waste energy if it | 697 | other hand we don't want to waste energy if it |
diff --git a/apps/gui/skin_engine/skin_engine.c b/apps/gui/skin_engine/skin_engine.c index 03afbc5195..bd875fe9e4 100644 --- a/apps/gui/skin_engine/skin_engine.c +++ b/apps/gui/skin_engine/skin_engine.c | |||
@@ -84,7 +84,7 @@ static struct gui_skin { | |||
84 | 84 | ||
85 | void gui_sync_skin_init(void) | 85 | void gui_sync_skin_init(void) |
86 | { | 86 | { |
87 | int i, j; | 87 | int j; |
88 | for(j=0; j<SKINNABLE_SCREENS_COUNT; j++) | 88 | for(j=0; j<SKINNABLE_SCREENS_COUNT; j++) |
89 | { | 89 | { |
90 | FOR_NB_SCREENS(i) | 90 | FOR_NB_SCREENS(i) |
@@ -105,7 +105,7 @@ void gui_sync_skin_init(void) | |||
105 | 105 | ||
106 | void skin_unload_all(void) | 106 | void skin_unload_all(void) |
107 | { | 107 | { |
108 | int i, j; | 108 | int j; |
109 | 109 | ||
110 | for(j=0; j<SKINNABLE_SCREENS_COUNT; j++) | 110 | for(j=0; j<SKINNABLE_SCREENS_COUNT; j++) |
111 | { | 111 | { |
@@ -123,7 +123,7 @@ void skin_unload_all(void) | |||
123 | 123 | ||
124 | void settings_apply_skins(void) | 124 | void settings_apply_skins(void) |
125 | { | 125 | { |
126 | int i, j; | 126 | int i; |
127 | 127 | ||
128 | skin_unload_all(); | 128 | skin_unload_all(); |
129 | /* Make sure each skin is loaded */ | 129 | /* Make sure each skin is loaded */ |
@@ -267,7 +267,6 @@ bool skin_do_full_update(enum skinnable_screens skin, | |||
267 | /* tell a skin to do a full update next time */ | 267 | /* tell a skin to do a full update next time */ |
268 | void skin_request_full_update(enum skinnable_screens skin) | 268 | void skin_request_full_update(enum skinnable_screens skin) |
269 | { | 269 | { |
270 | int i; | ||
271 | FOR_NB_SCREENS(i) | 270 | FOR_NB_SCREENS(i) |
272 | skins[skin][i].needs_full_update = true; | 271 | skins[skin][i].needs_full_update = true; |
273 | } | 272 | } |