summaryrefslogtreecommitdiff
path: root/src/company_gui.cpp
diff options
context:
space:
mode:
authorrubidium42 <rubidium@openttd.org>2021-05-26 20:51:17 +0200
committerrubidium42 <rubidium42@users.noreply.github.com>2021-05-27 18:30:56 +0200
commitb791ffc6de6dcc33739bb36bec4824dc44417961 (patch)
tree0f3c42eee61630369a59623b36e0920fcecb9235 /src/company_gui.cpp
parenteaa3df1e8e3c9c6f6a22e95d0d4ed8ff251d4af9 (diff)
downloadopenttd-b791ffc6de6dcc33739bb36bec4824dc44417961.tar.xz
Fix: do not hide parameter by local variable with the same name
Diffstat (limited to 'src/company_gui.cpp')
-rw-r--r--src/company_gui.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/company_gui.cpp b/src/company_gui.cpp
index f9eceba17..a23bda7bd 100644
--- a/src/company_gui.cpp
+++ b/src/company_gui.cpp
@@ -776,11 +776,11 @@ public:
case WID_SCL_PRI_COL_DROPDOWN: {
this->square = GetSpriteSize(SPR_SQUARE);
- int padding = this->square.width + NWidgetScrollbar::GetVerticalDimension().width + 10;
+ int string_padding = this->square.width + NWidgetScrollbar::GetVerticalDimension().width + 10;
for (const StringID *id = _colour_dropdown; id != endof(_colour_dropdown); id++) {
- size->width = std::max(size->width, GetStringBoundingBox(*id).width + padding);
+ size->width = std::max(size->width, GetStringBoundingBox(*id).width + string_padding);
}
- size->width = std::max(size->width, GetStringBoundingBox(STR_COLOUR_DEFAULT).width + padding);
+ size->width = std::max(size->width, GetStringBoundingBox(STR_COLOUR_DEFAULT).width + string_padding);
break;
}
}