diff options
author | alberth <alberth@openttd.org> | 2009-10-17 08:14:39 +0000 |
---|---|---|
committer | alberth <alberth@openttd.org> | 2009-10-17 08:14:39 +0000 |
commit | 13c1694158f6f0c4034307f7b9021a4e3b034eb9 (patch) | |
tree | d11ca25f85bf3bd6c69caae66e315ad883190827 /src | |
parent | 29e173185a337590e48495919f9667c1c2c0026a (diff) | |
download | openttd-13c1694158f6f0c4034307f7b9021a4e3b034eb9.tar.xz |
(svn r17783) -Codechange: Remove local pointer variable 'widget' from autoreplace window.
Diffstat (limited to 'src')
-rw-r--r-- | src/autoreplace_gui.cpp | 15 |
1 files changed, 6 insertions, 9 deletions
diff --git a/src/autoreplace_gui.cpp b/src/autoreplace_gui.cpp index a007f3411..928a5cec2 100644 --- a/src/autoreplace_gui.cpp +++ b/src/autoreplace_gui.cpp @@ -209,8 +209,7 @@ public: this->resize.step_height = GetVehicleListHeight(vehicletype); this->vscroll.SetCapacity(this->resize.step_height == 14 ? 8 : 4); - Widget *widget = this->widget; - widget[RVW_WIDGET_LEFT_MATRIX].data = widget[RVW_WIDGET_RIGHT_MATRIX].data = (this->vscroll.GetCapacity() << MAT_ROW_START) + (1 << MAT_COL_START); + this->widget[RVW_WIDGET_LEFT_MATRIX].data = this->widget[RVW_WIDGET_RIGHT_MATRIX].data = (this->vscroll.GetCapacity() << MAT_ROW_START) + (1 << MAT_COL_START); if (vehicletype != VEH_TRAIN) { /* Since it's not a train we will hide the train only widgets. */ @@ -405,9 +404,7 @@ public: this->vscroll.UpdateCapacity(delta.y / (int)this->resize.step_height); this->vscroll2.UpdateCapacity(delta.y / (int)this->resize.step_height); - Widget *widget = this->widget; - - widget[RVW_WIDGET_LEFT_MATRIX].data = widget[RVW_WIDGET_RIGHT_MATRIX].data = (this->vscroll.GetCapacity() << MAT_ROW_START) + (1 << MAT_COL_START); + this->widget[RVW_WIDGET_LEFT_MATRIX].data = this->widget[RVW_WIDGET_RIGHT_MATRIX].data = (this->vscroll.GetCapacity() << MAT_ROW_START) + (1 << MAT_COL_START); if (delta.x != 0) { /* We changed the width of the window so we have to resize the lists. @@ -418,10 +415,10 @@ public: * to place the lists. * This way the lists will have equal size while keeping the width of the scrollbars unchanged. */ ResizeButtons(this, RVW_WIDGET_LEFT_DETAILS, RVW_WIDGET_RIGHT_DETAILS); - widget[RVW_WIDGET_RIGHT_MATRIX].left = widget[RVW_WIDGET_RIGHT_DETAILS].left; - widget[RVW_WIDGET_LEFT_SCROLLBAR].right = widget[RVW_WIDGET_LEFT_DETAILS].right; - widget[RVW_WIDGET_LEFT_SCROLLBAR].left = widget[RVW_WIDGET_LEFT_SCROLLBAR].right - 11; - widget[RVW_WIDGET_LEFT_MATRIX].right = widget[RVW_WIDGET_LEFT_SCROLLBAR].left - 1; + this->widget[RVW_WIDGET_RIGHT_MATRIX].left = this->widget[RVW_WIDGET_RIGHT_DETAILS].left; + this->widget[RVW_WIDGET_LEFT_SCROLLBAR].right = this->widget[RVW_WIDGET_LEFT_DETAILS].right; + this->widget[RVW_WIDGET_LEFT_SCROLLBAR].left = this->widget[RVW_WIDGET_LEFT_SCROLLBAR].right - 11; + this->widget[RVW_WIDGET_LEFT_MATRIX].right = this->widget[RVW_WIDGET_LEFT_SCROLLBAR].left - 1; } } |