summaryrefslogtreecommitdiff
path: root/src/network/network_content_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/network/network_content_gui.cpp
parent2332034822a9e2c9b1ed58e7f243a48cb8d630a6 (diff)
downloadopenttd-bf93372ca26375e392ff62a91db4de4c126dff38.tar.xz
(svn r18220) -Codechange: Reduce number of nested widget dynamic casts.
Diffstat (limited to 'src/network/network_content_gui.cpp')
-rw-r--r--src/network/network_content_gui.cpp8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/network/network_content_gui.cpp b/src/network/network_content_gui.cpp
index dc24eaee3..2953ba468 100644
--- a/src/network/network_content_gui.cpp
+++ b/src/network/network_content_gui.cpp
@@ -439,9 +439,9 @@ public:
void DrawMatrix(const Rect &r) const
{
- const NWidgetCore *nwi_checkbox = this->GetWidget<NWidgetCore>(NCLWW_CHECKBOX);
- const NWidgetCore *nwi_name = this->GetWidget<NWidgetCore>(NCLWW_NAME);
- const NWidgetCore *nwi_type = this->GetWidget<NWidgetCore>(NCLWW_TYPE);
+ const NWidgetBase *nwi_checkbox = this->GetWidget<NWidgetBase>(NCLWW_CHECKBOX);
+ const NWidgetBase *nwi_name = this->GetWidget<NWidgetBase>(NCLWW_NAME);
+ const NWidgetBase *nwi_type = this->GetWidget<NWidgetBase>(NCLWW_TYPE);
/* Fill the matrix with the information */
@@ -608,7 +608,7 @@ public:
this->selected = *this->content.Get(id_v);
this->list_pos = id_v;
- if (pt.x <= (int)(this->GetWidget<NWidgetCore>(NCLWW_CHECKBOX)->pos_y + this->GetWidget<NWidgetCore>(NCLWW_CHECKBOX)->current_y)) {
+ if (pt.x <= (int)(this->GetWidget<NWidgetBase>(NCLWW_CHECKBOX)->pos_y + this->GetWidget<NWidgetBase>(NCLWW_CHECKBOX)->current_y)) {
_network_content_client.ToggleSelectedState(this->selected);
this->content.ForceResort();
}