diff options
author | frosch <frosch@openttd.org> | 2012-05-28 13:29:05 +0000 |
---|---|---|
committer | frosch <frosch@openttd.org> | 2012-05-28 13:29:05 +0000 |
commit | 41c8df35db2c6cfa68f012c3b941631bd183f377 (patch) | |
tree | b8a21c4128aa8b9723dbd2497d69c1c45c693e7c /src | |
parent | 5eca828aa4cb161b111c5706a4aa7ef2f2cf21b3 (diff) | |
download | openttd-41c8df35db2c6cfa68f012c3b941631bd183f377.tar.xz |
(svn r24296) -Codechange: No need to pass a member variable to a member function.
Diffstat (limited to 'src')
-rw-r--r-- | src/settings_gui.cpp | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/settings_gui.cpp b/src/settings_gui.cpp index 099b8a960..8426a1ae9 100644 --- a/src/settings_gui.cpp +++ b/src/settings_gui.cpp @@ -1026,7 +1026,7 @@ struct SettingEntry { } private: - void DrawSetting(GameSettings *settings_ptr, const SettingDesc *sd, int x, int y, int max_x, int state, bool highlight); + void DrawSetting(GameSettings *settings_ptr, int x, int y, int max_x, int state, bool highlight); }; /** Data structure describing one page of settings in the settings window. */ @@ -1237,7 +1237,7 @@ uint SettingEntry::Draw(GameSettings *settings_ptr, int left, int right, int bas switch (this->flags & SEF_KIND_MASK) { case SEF_SETTING_KIND: if (cur_row >= first_row) { - this->DrawSetting(settings_ptr, this->d.entry.setting, rtl ? left : x, rtl ? x : right, y, this->flags & SEF_BUTTONS_MASK, + this->DrawSetting(settings_ptr, rtl ? left : x, rtl ? x : right, y, this->flags & SEF_BUTTONS_MASK, this == selected); } cur_row++; @@ -1278,15 +1278,15 @@ static const void *ResolveVariableAddress(const GameSettings *settings_ptr, cons /** * Private function to draw setting value (button + text + current value) * @param settings_ptr Pointer to current values of all settings - * @param sd Pointer to value description of setting to draw * @param left Left-most position in window/panel to start drawing * @param right Right-most position in window/panel to draw * @param y Upper-most position in window/panel to start drawing * @param state State of the left + right arrow buttons to draw for the setting * @param highlight Highlight entry. */ -void SettingEntry::DrawSetting(GameSettings *settings_ptr, const SettingDesc *sd, int left, int right, int y, int state, bool highlight) +void SettingEntry::DrawSetting(GameSettings *settings_ptr, int left, int right, int y, int state, bool highlight) { + const SettingDesc *sd = this->d.entry.setting; const SettingDescBase *sdb = &sd->desc; const void *var = ResolveVariableAddress(settings_ptr, sd); bool editable = true; |