summaryrefslogtreecommitdiff
path: root/src/settings_gui.cpp
diff options
context:
space:
mode:
authoralberth <alberth@openttd.org>2009-11-22 13:22:53 +0000
committeralberth <alberth@openttd.org>2009-11-22 13:22:53 +0000
commitbf93372ca26375e392ff62a91db4de4c126dff38 (patch)
treeb09443cc8800ee93a79bb1df23f79283e8ddebbf /src/settings_gui.cpp
parent2332034822a9e2c9b1ed58e7f243a48cb8d630a6 (diff)
downloadopenttd-bf93372ca26375e392ff62a91db4de4c126dff38.tar.xz
(svn r18220) -Codechange: Reduce number of nested widget dynamic casts.
Diffstat (limited to 'src/settings_gui.cpp')
-rw-r--r--src/settings_gui.cpp4
1 files changed, 2 insertions, 2 deletions
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<NWidgetCore>(widget)->pos_y - SETTINGTREE_TOP_OFFSET; // Shift y coordinate
+ int y = pt.y - this->GetWidget<NWidgetBase>(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<NWidgetCore>(CUSTCURR_RATE_DOWN)->smallest_x + this->GetWidget<NWidgetCore>(CUSTCURR_RATE_UP)->smallest_x;
+ size->width = this->GetWidget<NWidgetBase>(CUSTCURR_RATE_DOWN)->smallest_x + this->GetWidget<NWidgetBase>(CUSTCURR_RATE_UP)->smallest_x;
break;
/* Make sure the window is wide enough for the widest exchange rate */