diff options
author | rubidium42 <rubidium@openttd.org> | 2021-05-26 20:51:17 +0200 |
---|---|---|
committer | rubidium42 <rubidium42@users.noreply.github.com> | 2021-05-27 18:30:56 +0200 |
commit | b791ffc6de6dcc33739bb36bec4824dc44417961 (patch) | |
tree | 0f3c42eee61630369a59623b36e0920fcecb9235 /src/company_gui.cpp | |
parent | eaa3df1e8e3c9c6f6a22e95d0d4ed8ff251d4af9 (diff) | |
download | openttd-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.cpp | 6 |
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; } } |