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 | c84fe27ca9ece2909a8b0f01d10f1e9704f9d8ae (patch) | |
tree | 63e2bd0279fba7a1ae215dcd1df8b5ad092a0cd4 /src/station_gui.cpp | |
parent | 118a680fd34aae6ab48d553d76237fe93e350759 (diff) | |
download | openttd-c84fe27ca9ece2909a8b0f01d10f1e9704f9d8ae.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); } /** |