diff options
author | rubidium <rubidium@openttd.org> | 2008-04-19 13:05:05 +0000 |
---|---|---|
committer | rubidium <rubidium@openttd.org> | 2008-04-19 13:05:05 +0000 |
commit | 081f62701882a4e97b5dff37f51a89965fe9faa5 (patch) | |
tree | 63e2bd0279fba7a1ae215dcd1df8b5ad092a0cd4 /src/station_gui.cpp | |
parent | af34ce0b5d0dd9e323039850779a1bd79aa7701a (diff) | |
download | openttd-081f62701882a4e97b5dff37f51a89965fe9faa5.tar.xz |
(svn r12787) -Documentation: add/fix documentation of some functions. Patch by Alberth.
Diffstat (limited to 'src/station_gui.cpp')
-rw-r--r-- | src/station_gui.cpp | 25 |
1 files changed, 13 insertions, 12 deletions
diff --git a/src/station_gui.cpp b/src/station_gui.cpp index 033fad74a..64e993e30 100644 --- a/src/station_gui.cpp +++ b/src/station_gui.cpp @@ -184,35 +184,36 @@ struct plstations_d { assert_compile(WINDOW_CUSTOM_SIZE >= sizeof(plstations_d)); /** - * Set the 'SL_REBUILD' flag for all station lists + * Set the station sort flag for all station-list windows. + * @param sl_flag Sort list flag to set for all station-list windows */ -void RebuildStationLists() +static void SetStationListsFlag(StationListFlags sl_flag) { Window *const *wz; FOR_ALL_WINDOWS(wz) { Window *w = *wz; if (w->window_class == WC_STATION_LIST) { - WP(w, plstations_d).flags |= SL_REBUILD; + WP(w, plstations_d).flags |= sl_flag; SetWindowDirty(w); } } } /** + * Set the 'SL_REBUILD' flag for all station lists + */ +void RebuildStationLists() +{ + SetStationListsFlag(SL_REBUILD); +} + +/** * Set the 'SL_RESORT' flag for all station lists */ void ResortStationLists() { - Window *const *wz; - - FOR_ALL_WINDOWS(wz) { - Window *w = *wz; - if (w->window_class == WC_STATION_LIST) { - WP(w, plstations_d).flags |= SL_RESORT; - SetWindowDirty(w); - } - } + SetStationListsFlag(SL_RESORT); } /** |