summaryrefslogtreecommitdiff
path: root/src/autoreplace_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/autoreplace_gui.cpp
parent2332034822a9e2c9b1ed58e7f243a48cb8d630a6 (diff)
downloadopenttd-bf93372ca26375e392ff62a91db4de4c126dff38.tar.xz
(svn r18220) -Codechange: Reduce number of nested widget dynamic casts.
Diffstat (limited to 'src/autoreplace_gui.cpp')
-rw-r--r--src/autoreplace_gui.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/autoreplace_gui.cpp b/src/autoreplace_gui.cpp
index 1b5dacadb..2c48feade 100644
--- a/src/autoreplace_gui.cpp
+++ b/src/autoreplace_gui.cpp
@@ -376,7 +376,7 @@ public:
/* Draw details panels. */
for (int side = 0; side < 2; side++) {
if (this->sel_engine[side] != INVALID_ENGINE) {
- NWidgetCore *nwi = this->GetWidget<NWidgetCore>(side == 0 ? RVW_WIDGET_LEFT_DETAILS : RVW_WIDGET_RIGHT_DETAILS);
+ NWidgetBase *nwi = this->GetWidget<NWidgetBase>(side == 0 ? RVW_WIDGET_LEFT_DETAILS : RVW_WIDGET_RIGHT_DETAILS);
int text_end = DrawVehiclePurchaseInfo(nwi->pos_x + WD_FRAMETEXT_LEFT, nwi->pos_x + nwi->current_x - WD_FRAMETEXT_RIGHT,
nwi->pos_y + WD_FRAMERECT_TOP, this->sel_engine[side]);
needed_height = max(needed_height, text_end - (int)nwi->pos_y + WD_FRAMERECT_BOTTOM);