summaryrefslogtreecommitdiff
path: root/src/road_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
commit9db77e3808139fe3364345aa7bf09a5e41198e4c (patch)
tree6760a7b433eda594e11470ba7695e8c399fadbfd /src/road_gui.cpp
parent8796331d83e09dda2ac4642f9215845cc2dd321c (diff)
downloadopenttd-9db77e3808139fe3364345aa7bf09a5e41198e4c.tar.xz
(svn r12976) -Codechange: use w->SetDirty() instead of SetWindowDirty(w) when it's certain that w != NULL.
Diffstat (limited to 'src/road_gui.cpp')
-rw-r--r--src/road_gui.cpp12
1 files changed, 6 insertions, 6 deletions
diff --git a/src/road_gui.cpp b/src/road_gui.cpp
index 30400f606..a0e43a6cd 100644
--- a/src/road_gui.cpp
+++ b/src/road_gui.cpp
@@ -352,7 +352,7 @@ static void BuildRoadClick_TruckStation(Window *w)
static void BuildRoadClick_OneWay(Window *w)
{
if (w->IsWidgetDisabled(RTW_ONE_WAY)) return;
- SetWindowDirty(w);
+ w->SetDirty();
w->ToggleWidgetLoweredState(RTW_ONE_WAY);
SetSelectionRed(false);
}
@@ -758,7 +758,7 @@ static void BuildRoadDepotWndProc(Window *w, WindowEvent *e)
_road_depot_orientation = (DiagDirection)(e->we.click.widget - BRDW_DEPOT_NE);
w->LowerWidget(_road_depot_orientation + BRDW_DEPOT_NE);
SndPlayFx(SND_15_BEEP);
- SetWindowDirty(w);
+ w->SetDirty();
break;
default:
@@ -888,9 +888,9 @@ static void RoadStationPickerWndProc(Window *w, WindowEvent *e)
(w->window_class == WC_BUS_STATION) ? SCT_PASSENGERS_ONLY : SCT_NON_PASSENGERS_ONLY,
3, true) + 4;
if (text_end > w->widget[BRSW_BACKGROUND].bottom) {
- SetWindowDirty(w);
+ w->SetDirty();
ResizeWindowForWidget(w, BRSW_BACKGROUND, 0, text_end - w->widget[BRSW_BACKGROUND].bottom);
- SetWindowDirty(w);
+ w->SetDirty();
}
} break;
@@ -906,7 +906,7 @@ static void RoadStationPickerWndProc(Window *w, WindowEvent *e)
_road_station_picker_orientation = (DiagDirection)(e->we.click.widget - BRSW_STATION_NE);
w->LowerWidget(_road_station_picker_orientation + BRSW_STATION_NE);
SndPlayFx(SND_15_BEEP);
- SetWindowDirty(w);
+ w->SetDirty();
break;
case BRSW_LT_OFF:
@@ -915,7 +915,7 @@ static void RoadStationPickerWndProc(Window *w, WindowEvent *e)
_station_show_coverage = (e->we.click.widget != BRSW_LT_OFF);
w->LowerWidget(_station_show_coverage + BRSW_LT_OFF);
SndPlayFx(SND_15_BEEP);
- SetWindowDirty(w);
+ w->SetDirty();
break;
default: