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/recorder/peakmeter.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/recorder/peakmeter.c')
-rw-r--r-- | apps/recorder/peakmeter.c | 9 |
1 files changed, 3 insertions, 6 deletions
diff --git a/apps/recorder/peakmeter.c b/apps/recorder/peakmeter.c index c7f2b17d05..9f0db3330a 100644 --- a/apps/recorder/peakmeter.c +++ b/apps/recorder/peakmeter.c | |||
@@ -403,7 +403,7 @@ static void peak_meter_set_min(int newmin) | |||
403 | 403 | ||
404 | pm_db_min = calc_db(peak_meter_range_min); | 404 | pm_db_min = calc_db(peak_meter_range_min); |
405 | pm_db_range = pm_db_max - pm_db_min; | 405 | pm_db_range = pm_db_max - pm_db_min; |
406 | int i; | 406 | |
407 | FOR_NB_SCREENS(i) | 407 | FOR_NB_SCREENS(i) |
408 | scales[i].db_scale_valid = false; | 408 | scales[i].db_scale_valid = false; |
409 | } | 409 | } |
@@ -452,7 +452,7 @@ static void peak_meter_set_max(int newmax) | |||
452 | 452 | ||
453 | pm_db_max = calc_db(peak_meter_range_max); | 453 | pm_db_max = calc_db(peak_meter_range_max); |
454 | pm_db_range = pm_db_max - pm_db_min; | 454 | pm_db_range = pm_db_max - pm_db_min; |
455 | int i; | 455 | |
456 | FOR_NB_SCREENS(i) | 456 | FOR_NB_SCREENS(i) |
457 | scales[i].db_scale_valid = false; | 457 | scales[i].db_scale_valid = false; |
458 | } | 458 | } |
@@ -493,7 +493,6 @@ bool peak_meter_get_use_dbfs(void) | |||
493 | */ | 493 | */ |
494 | void peak_meter_set_use_dbfs(bool use) | 494 | void peak_meter_set_use_dbfs(bool use) |
495 | { | 495 | { |
496 | int i; | ||
497 | pm_use_dbfs = use; | 496 | pm_use_dbfs = use; |
498 | FOR_NB_SCREENS(i) | 497 | FOR_NB_SCREENS(i) |
499 | scales[i].db_scale_valid = false; | 498 | scales[i].db_scale_valid = false; |
@@ -571,7 +570,6 @@ void pm_reset_clipcount(void) | |||
571 | */ | 570 | */ |
572 | void peak_meter_playback(bool playback) | 571 | void peak_meter_playback(bool playback) |
573 | { | 572 | { |
574 | int i; | ||
575 | #if (CONFIG_PLATFORM & PLATFORM_HOSTED) | 573 | #if (CONFIG_PLATFORM & PLATFORM_HOSTED) |
576 | (void)playback; | 574 | (void)playback; |
577 | #elif CONFIG_CODEC == SWCODEC | 575 | #elif CONFIG_CODEC == SWCODEC |
@@ -1313,7 +1311,6 @@ void peak_meter_draw_trig(int xpos[], int ypos[], | |||
1313 | int barend[NB_SCREENS]; | 1311 | int barend[NB_SCREENS]; |
1314 | int icon; | 1312 | int icon; |
1315 | int ixpos[NB_SCREENS]; | 1313 | int ixpos[NB_SCREENS]; |
1316 | int i; | ||
1317 | int trigbar_width[NB_SCREENS]; | 1314 | int trigbar_width[NB_SCREENS]; |
1318 | 1315 | ||
1319 | FOR_NB_SCREENS(i) | 1316 | FOR_NB_SCREENS(i) |
@@ -1374,7 +1371,7 @@ void peak_meter_draw_trig(int xpos[], int ypos[], | |||
1374 | return; | 1371 | return; |
1375 | } | 1372 | } |
1376 | 1373 | ||
1377 | for(i = 0; i < nb_screens; i++) | 1374 | for(int i = 0; i < nb_screens; i++) |
1378 | { | 1375 | { |
1379 | gui_scrollbar_draw(&screens[i], xpos[i] + ICON_PLAY_STATE_WIDTH + 1, | 1376 | gui_scrollbar_draw(&screens[i], xpos[i] + ICON_PLAY_STATE_WIDTH + 1, |
1380 | ypos[i] + 1, trigbar_width[i], TRIG_HEIGHT - 2, | 1377 | ypos[i] + 1, trigbar_width[i], TRIG_HEIGHT - 2, |