From bf93372ca26375e392ff62a91db4de4c126dff38 Mon Sep 17 00:00:00 2001 From: alberth Date: Sun, 22 Nov 2009 13:22:53 +0000 Subject: (svn r18220) -Codechange: Reduce number of nested widget dynamic casts. --- src/settings_gui.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/settings_gui.cpp') diff --git a/src/settings_gui.cpp b/src/settings_gui.cpp index 2669addf2..bcd73cd13 100644 --- a/src/settings_gui.cpp +++ b/src/settings_gui.cpp @@ -1504,7 +1504,7 @@ struct GameSettingsWindow : Window { { if (widget != SETTINGSEL_OPTIONSPANEL) return; - int y = pt.y - this->GetWidget(widget)->pos_y - SETTINGTREE_TOP_OFFSET; // Shift y coordinate + int y = pt.y - this->GetWidget(widget)->pos_y - SETTINGTREE_TOP_OFFSET; // Shift y coordinate if (y < 0) return; // Clicked above first entry byte btn = this->vscroll.GetPosition() + y / this->resize.step_height; // Compute which setting is selected @@ -1767,7 +1767,7 @@ struct CustomCurrencyWindow : Window { case CUSTCURR_SEPARATOR_EDIT: case CUSTCURR_PREFIX_EDIT: case CUSTCURR_SUFFIX_EDIT: - size->width = this->GetWidget(CUSTCURR_RATE_DOWN)->smallest_x + this->GetWidget(CUSTCURR_RATE_UP)->smallest_x; + size->width = this->GetWidget(CUSTCURR_RATE_DOWN)->smallest_x + this->GetWidget(CUSTCURR_RATE_UP)->smallest_x; break; /* Make sure the window is wide enough for the widest exchange rate */ -- cgit v1.2.3-54-g00ecf