diff options
author | smatz <smatz@openttd.org> | 2008-05-13 22:19:20 +0000 |
---|---|---|
committer | smatz <smatz@openttd.org> | 2008-05-13 22:19:20 +0000 |
commit | dac285a74b2a72cf148883bbbc53840dfe7433b4 (patch) | |
tree | 8c57eaa718591302ffd0a53acb56bb7c0e5d55e2 /src | |
parent | bea03ab5e72e83aa851f30e22c5c53f4a5c0d85d (diff) | |
download | openttd-dac285a74b2a72cf148883bbbc53840dfe7433b4.tar.xz |
(svn r13080) -Fix: warning about unused variable when compiling without asserts
Diffstat (limited to 'src')
-rw-r--r-- | src/station_gui.cpp | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/src/station_gui.cpp b/src/station_gui.cpp index e14fbbe8f..36f2fc21b 100644 --- a/src/station_gui.cpp +++ b/src/station_gui.cpp @@ -436,8 +436,6 @@ struct PlayerStationsWindow : public Window, public GUIStationList virtual void OnClick(Point pt, int widget) { - PlayerID owner = (PlayerID)this->window_number; - switch (widget) { case SLW_LIST: { uint32 id_v = (pt.y - 41) / 10; @@ -450,7 +448,7 @@ struct PlayerStationsWindow : public Window, public GUIStationList const Station *st = this->sort_list[id_v]; /* do not check HasStationInUse - it is slow and may be invalid */ - assert(st->owner == owner || (st->owner == OWNER_NONE && !st->IsBuoy())); + assert(st->owner == (PlayerID)this->window_number || (st->owner == OWNER_NONE && !st->IsBuoy())); if (_ctrl_pressed) { ShowExtraViewPortWindow(st->xy); |