# HG changeset patch # User smatz # Date 1210717160 0 # Node ID 933c86db8e4438714a57bc5c4ad3d4bcfae8df9d # Parent 67e8293d4f9acd169819a33542eec4c1f2281258 (svn r13080) -Fix: warning about unused variable when compiling without asserts diff -r 67e8293d4f9a -r 933c86db8e44 src/station_gui.cpp --- a/src/station_gui.cpp Tue May 13 22:02:14 2008 +0000 +++ b/src/station_gui.cpp Tue May 13 22:19:20 2008 +0000 @@ -436,8 +436,6 @@ 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 @@ 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);