summaryrefslogtreecommitdiff
path: root/src/station_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/station_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/station_gui.cpp')
-rw-r--r--src/station_gui.cpp24
1 files changed, 12 insertions, 12 deletions
diff --git a/src/station_gui.cpp b/src/station_gui.cpp
index 9c3d9d42a..376a234d5 100644
--- a/src/station_gui.cpp
+++ b/src/station_gui.cpp
@@ -195,7 +195,7 @@ static void SetStationListsFlag(StationListFlags sl_flag)
Window *w = *wz;
if (w->window_class == WC_STATION_LIST) {
WP(w, plstations_d).flags |= sl_flag;
- SetWindowDirty(w);
+ w->SetDirty();
}
}
}
@@ -449,7 +449,7 @@ static void PlayerStationsWndProc(Window *w, WindowEvent *e)
}
w->SetWidgetLoweredState(SLW_FACILALL, facilities == (FACIL_TRAIN | FACIL_TRUCK_STOP | FACIL_BUS_STOP | FACIL_AIRPORT | FACIL_DOCK));
sl->flags |= SL_REBUILD;
- SetWindowDirty(w);
+ w->SetDirty();
break;
case SLW_FACILALL:
@@ -460,7 +460,7 @@ static void PlayerStationsWndProc(Window *w, WindowEvent *e)
facilities = FACIL_TRAIN | FACIL_TRUCK_STOP | FACIL_BUS_STOP | FACIL_AIRPORT | FACIL_DOCK;
sl->flags |= SL_REBUILD;
- SetWindowDirty(w);
+ w->SetDirty();
break;
case SLW_CARGOALL: {
@@ -476,7 +476,7 @@ static void PlayerStationsWndProc(Window *w, WindowEvent *e)
_cargo_filter = _cargo_mask;
include_empty = true;
sl->flags |= SL_REBUILD;
- SetWindowDirty(w);
+ w->SetDirty();
break;
}
@@ -486,7 +486,7 @@ static void PlayerStationsWndProc(Window *w, WindowEvent *e)
sl->flags |= SL_RESORT;
w->flags4 |= 5 << WF_TIMEOUT_SHL;
w->LowerWidget(SLW_SORTBY);
- SetWindowDirty(w);
+ w->SetDirty();
break;
case SLW_SORTDROPBTN: // select sorting criteria dropdown menu
@@ -509,7 +509,7 @@ static void PlayerStationsWndProc(Window *w, WindowEvent *e)
}
sl->flags |= SL_REBUILD;
w->SetWidgetLoweredState(SLW_CARGOALL, _cargo_filter == _cargo_mask && include_empty);
- SetWindowDirty(w);
+ w->SetDirty();
break;
default:
@@ -540,7 +540,7 @@ static void PlayerStationsWndProc(Window *w, WindowEvent *e)
}
sl->flags |= SL_REBUILD;
w->SetWidgetLoweredState(SLW_CARGOALL, _cargo_filter == _cargo_mask && include_empty);
- SetWindowDirty(w);
+ w->SetDirty();
}
break;
}
@@ -553,7 +553,7 @@ static void PlayerStationsWndProc(Window *w, WindowEvent *e)
station_sort.criteria = sl->sort_type;
sl->flags |= SL_RESORT;
}
- SetWindowDirty(w);
+ w->SetDirty();
break;
case WE_TICK:
@@ -562,13 +562,13 @@ static void PlayerStationsWndProc(Window *w, WindowEvent *e)
DEBUG(misc, 3, "Periodic rebuild station list player %d", owner);
sl->resort_timer = DAY_TICKS * PERIODIC_RESORT_DAYS;
sl->flags |= SL_REBUILD;
- SetWindowDirty(w);
+ w->SetDirty();
}
break;
case WE_TIMEOUT:
w->RaiseWidget(SLW_SORTBY);
- SetWindowDirty(w);
+ w->SetDirty();
break;
case WE_RESIZE:
@@ -949,7 +949,7 @@ static void StationViewWndProc(Window *w, WindowEvent *e)
break;
case SVW_RATINGS:
- SetWindowDirty(w);
+ w->SetDirty();
if (w->widget[SVW_RATINGS].data == STR_3032_RATINGS) {
/* Switch to ratings view */
@@ -963,7 +963,7 @@ static void StationViewWndProc(Window *w, WindowEvent *e)
ResizeWindowForWidget(w, SVW_ACCEPTLIST, 0, -100);
}
- SetWindowDirty(w);
+ w->SetDirty();
break;
case SVW_RENAME: