Reverse loop variable avoidance

This commit is contained in:
John Scipione
2013-04-08 23:13:33 -04:00
parent eba68f6124
commit 0112415f3b
+3 -6
View File
@@ -227,8 +227,7 @@ APRView::Revert()
bool
APRView::IsDefaultable()
{
int32 count = color_description_count();
for (int32 i = 0; i < count; i++) {
for (int32 i = color_description_count() - 1; i >= 0; i--) {
color_which which = get_color_description(i)->which;
if (fCurrentSet.GetColor(which) != fDefaultSet.GetColor(which))
return true;
@@ -241,8 +240,7 @@ APRView::IsDefaultable()
bool
APRView::IsRevertable()
{
int32 count = color_description_count();
for (int32 i = 0; i < count; i++) {
for (int32 i = color_description_count() - 1; i >= 0; i--) {
color_which which = get_color_description(i)->which;
if (fCurrentSet.GetColor(which) != fPrevSet.GetColor(which))
return true;
@@ -274,8 +272,7 @@ APRView::_SetCurrentColor(rgb_color color)
void
APRView::_UpdateAllColors()
{
int32 count = color_description_count();
for (int32 i = 0; i < count; i++) {
for (int32 i = color_description_count() - 1; i >= 0; i--) {
color_which which = get_color_description(i)->which;
rgb_color color = fCurrentSet.GetColor(which);
set_ui_color(which, color);