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/viewport.c | |
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/viewport.c')
-rw-r--r-- | apps/gui/viewport.c | 4 |
1 files changed, 0 insertions, 4 deletions
diff --git a/apps/gui/viewport.c b/apps/gui/viewport.c index df8093d581..2ab6c343ef 100644 --- a/apps/gui/viewport.c +++ b/apps/gui/viewport.c | |||
@@ -104,7 +104,6 @@ static void toggle_theme(enum screen_type screen, bool force) | |||
104 | bool enable_event = false; | 104 | bool enable_event = false; |
105 | static bool was_enabled[NB_SCREENS] = {false}; | 105 | static bool was_enabled[NB_SCREENS] = {false}; |
106 | static bool after_boot[NB_SCREENS] = {false}; | 106 | static bool after_boot[NB_SCREENS] = {false}; |
107 | int i; | ||
108 | 107 | ||
109 | FOR_NB_SCREENS(i) | 108 | FOR_NB_SCREENS(i) |
110 | { | 109 | { |
@@ -233,7 +232,6 @@ int viewport_get_nb_lines(const struct viewport *vp) | |||
233 | 232 | ||
234 | static void viewportmanager_redraw(void* data) | 233 | static void viewportmanager_redraw(void* data) |
235 | { | 234 | { |
236 | int i; | ||
237 | FOR_NB_SCREENS(i) | 235 | FOR_NB_SCREENS(i) |
238 | { | 236 | { |
239 | #ifdef HAVE_LCD_BITMAP | 237 | #ifdef HAVE_LCD_BITMAP |
@@ -249,7 +247,6 @@ static void viewportmanager_redraw(void* data) | |||
249 | void viewportmanager_init() | 247 | void viewportmanager_init() |
250 | { | 248 | { |
251 | #ifdef HAVE_LCD_BITMAP | 249 | #ifdef HAVE_LCD_BITMAP |
252 | int i; | ||
253 | FOR_NB_SCREENS(i) | 250 | FOR_NB_SCREENS(i) |
254 | { | 251 | { |
255 | theme_stack_top[i] = -1; /* the next call fixes this to 0 */ | 252 | theme_stack_top[i] = -1; /* the next call fixes this to 0 */ |
@@ -264,7 +261,6 @@ void viewportmanager_init() | |||
264 | #ifdef HAVE_LCD_BITMAP | 261 | #ifdef HAVE_LCD_BITMAP |
265 | void viewportmanager_theme_changed(const int which) | 262 | void viewportmanager_theme_changed(const int which) |
266 | { | 263 | { |
267 | int i; | ||
268 | #ifdef HAVE_BUTTONBAR | 264 | #ifdef HAVE_BUTTONBAR |
269 | if (which & THEME_BUTTONBAR) | 265 | if (which & THEME_BUTTONBAR) |
270 | { /* don't handle further, the custom ui viewport ignores the buttonbar, | 266 | { /* don't handle further, the custom ui viewport ignores the buttonbar, |