summaryrefslogtreecommitdiff
path: root/scene/gui/texture_button.cpp
diff options
context:
space:
mode:
authormarxin <mliska@suse.cz>2019-02-12 21:10:08 +0100
committerRĂ©mi Verschelde <rverschelde@gmail.com>2019-02-20 19:44:12 +0100
commit8d51618949d5ea8a94e0f504401e8f852a393968 (patch)
tree6c0ab829b02aba47ff3dc27b9a14d3c3a0658a3b /scene/gui/texture_button.cpp
parent132e2f458df7a3551a251d68afeccd0362ca6be2 (diff)
Add -Wshadow=local to warnings and fix reported issues.
Fixes #25316.
Diffstat (limited to 'scene/gui/texture_button.cpp')
-rw-r--r--scene/gui/texture_button.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/scene/gui/texture_button.cpp b/scene/gui/texture_button.cpp
index 95aab95253..c165c5a545 100644
--- a/scene/gui/texture_button.cpp
+++ b/scene/gui/texture_button.cpp
@@ -206,8 +206,8 @@ void TextureButton::_notification(int p_what) {
Size2 scaleSize(size.width / tex_size.width, size.height / tex_size.height);
float scale = scaleSize.width > scaleSize.height ? scaleSize.width : scaleSize.height;
Size2 scaledTexSize = tex_size * scale;
- Point2 ofs = ((scaledTexSize - size) / scale).abs() / 2.0f;
- _texture_region = Rect2(ofs, size / scale);
+ Point2 ofs2 = ((scaledTexSize - size) / scale).abs() / 2.0f;
+ _texture_region = Rect2(ofs2, size / scale);
} break;
}
}