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]; static int buflib_move_callback(int handle, void* current, void* new) { - int i; if (handle == handle_being_loaded) return BUFLIB_CB_CANNOT_MOVE; - for (i=0; i<NB_BDROPS; i++) + for (int i=0; i<NB_BDROPS; i++) { if (backdrops[i].buffer == current) { @@ -65,9 +64,7 @@ static struct buflib_callbacks buflib_ops = {buflib_move_callback, NULL}; static bool first_go = true; void skin_backdrop_init(void) { - int i; - - for (i=0; i<NB_BDROPS; i++) + for (int i=0; i<NB_BDROPS; i++) { if (first_go) 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) (void)skin; /* silence charcell warning */ int button = ACTION_NONE; #ifdef HAVE_LCD_BITMAP - int i; /* when the peak meter is enabled we want to have a few extra updates to make it look smooth. On the 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 { void gui_sync_skin_init(void) { - int i, j; + int j; for(j=0; j<SKINNABLE_SCREENS_COUNT; j++) { FOR_NB_SCREENS(i) @@ -105,7 +105,7 @@ void gui_sync_skin_init(void) void skin_unload_all(void) { - int i, j; + int j; for(j=0; j<SKINNABLE_SCREENS_COUNT; j++) { @@ -123,7 +123,7 @@ void skin_unload_all(void) void settings_apply_skins(void) { - int i, j; + int i; skin_unload_all(); /* Make sure each skin is loaded */ @@ -267,7 +267,6 @@ bool skin_do_full_update(enum skinnable_screens skin, /* tell a skin to do a full update next time */ void skin_request_full_update(enum skinnable_screens skin) { - int i; FOR_NB_SCREENS(i) skins[skin][i].needs_full_update = true; } |