summaryrefslogtreecommitdiff
path: root/src/graph_gui.cpp
diff options
context:
space:
mode:
authorrubidium <rubidium@openttd.org>2008-05-06 22:08:18 +0000
committerrubidium <rubidium@openttd.org>2008-05-06 22:08:18 +0000
commit9bf519f26bc9b3e174803c8ebfd2427bf7c5fb61 (patch)
tree6760a7b433eda594e11470ba7695e8c399fadbfd /src/graph_gui.cpp
parente6c944a6c4507ec00948391d1b0bdf300bbd879e (diff)
downloadopenttd-9bf519f26bc9b3e174803c8ebfd2427bf7c5fb61.tar.xz
(svn r12976) -Codechange: use w->SetDirty() instead of SetWindowDirty(w) when it's certain that w != NULL.
Diffstat (limited to 'src/graph_gui.cpp')
-rw-r--r--src/graph_gui.cpp20
1 files changed, 10 insertions, 10 deletions
diff --git a/src/graph_gui.cpp b/src/graph_gui.cpp
index ee3c4dfaa..bce14576b 100644
--- a/src/graph_gui.cpp
+++ b/src/graph_gui.cpp
@@ -304,7 +304,7 @@ static void GraphLegendWndProc(Window *w, WindowEvent *e)
ToggleBit(_legend_excluded_players, e->we.click.widget - 3);
w->ToggleWidgetLoweredState(e->we.click.widget);
- SetWindowDirty(w);
+ w->SetDirty();
InvalidateWindow(WC_INCOME_GRAPH, 0);
InvalidateWindow(WC_OPERATING_PROFIT, 0);
InvalidateWindow(WC_DELIVERED_CARGO, 0);
@@ -783,7 +783,7 @@ static void CargoPaymentRatesWndProc(Window *w, WindowEvent *e)
if (e->we.click.widget >= 3) {
ToggleBit(_legend_excluded_cargo, e->we.click.widget - 3);
w->ToggleWidgetLoweredState(e->we.click.widget);
- SetWindowDirty(w);
+ w->SetDirty();
}
break;
}
@@ -840,7 +840,7 @@ void ShowCargoPaymentRates()
if (!HasBit(_legend_excluded_cargo, i)) w->LowerWidget(i + 3);
}
- SetWindowDirty(w);
+ w->SetDirty();
}
/************************/
@@ -955,7 +955,7 @@ static void PerformanceRatingDetailWndProc(Window *w, WindowEvent *e)
/* Raise and disable the widget for the previous selection. */
w->RaiseWidget(_performance_rating_detail_player + 13);
w->DisableWidget(_performance_rating_detail_player + 13);
- SetWindowDirty(w);
+ w->SetDirty();
_performance_rating_detail_player = INVALID_PLAYER;
}
@@ -964,7 +964,7 @@ static void PerformanceRatingDetailWndProc(Window *w, WindowEvent *e)
if (GetPlayer(i)->is_active) {
/* Lower the widget corresponding to this player. */
w->LowerWidget(i + 13);
- SetWindowDirty(w);
+ w->SetDirty();
_performance_rating_detail_player = i;
break;
@@ -984,7 +984,7 @@ static void PerformanceRatingDetailWndProc(Window *w, WindowEvent *e)
w->DisableWidget(i + 13);
/* We need a repaint */
- SetWindowDirty(w);
+ w->SetDirty();
}
continue;
}
@@ -994,7 +994,7 @@ static void PerformanceRatingDetailWndProc(Window *w, WindowEvent *e)
/* New player! Yippie :p */
w->EnableWidget(i + 13);
/* We need a repaint */
- SetWindowDirty(w);
+ w->SetDirty();
}
x = (i == _performance_rating_detail_player) ? 1 : 0;
@@ -1077,7 +1077,7 @@ static void PerformanceRatingDetailWndProc(Window *w, WindowEvent *e)
w->RaiseWidget(_performance_rating_detail_player + 13);
_performance_rating_detail_player = (PlayerID)(e->we.click.widget - 13);
w->LowerWidget(_performance_rating_detail_player + 13);
- SetWindowDirty(w);
+ w->SetDirty();
}
}
break;
@@ -1099,7 +1099,7 @@ static void PerformanceRatingDetailWndProc(Window *w, WindowEvent *e)
w->custom[1] = 5;
if (_performance_rating_detail_player != INVALID_PLAYER) w->LowerWidget(_performance_rating_detail_player + 13);
- SetWindowDirty(w);
+ w->SetDirty();
break;
}
@@ -1118,7 +1118,7 @@ static void PerformanceRatingDetailWndProc(Window *w, WindowEvent *e)
/* Skip if player is not active */
if (p2->is_active) UpdateCompanyRatingAndValue(p2, false);
}
- SetWindowDirty(w);
+ w->SetDirty();
}
}