diff options
| author | Rémi Verschelde | 2017-08-25 08:37:38 +0200 |
|---|---|---|
| committer | GitHub | 2017-08-25 08:37:38 +0200 |
| commit | 490aef93699abc00da58f73b1596fb3473fd53c6 (patch) | |
| tree | 7912c7a540eca6b09392bbd2aa2f30fefe37f51a /scene/gui/color_picker.cpp | |
| parent | b1c0e45b03aa14453846c9a888763077eef2476b (diff) | |
| parent | cacced7e507f7603bacc03ae2616e58f0ede122a (diff) | |
| download | godot-490aef93699abc00da58f73b1596fb3473fd53c6.tar.gz godot-490aef93699abc00da58f73b1596fb3473fd53c6.tar.zst godot-490aef93699abc00da58f73b1596fb3473fd53c6.zip | |
Merge pull request #10581 from hpvb/fix-gcc6+
Make cast_to a static member of Object.
Diffstat (limited to 'scene/gui/color_picker.cpp')
| -rw-r--r-- | scene/gui/color_picker.cpp | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/scene/gui/color_picker.cpp b/scene/gui/color_picker.cpp index 5257f9df3..cdb4a1923 100644 --- a/scene/gui/color_picker.cpp +++ b/scene/gui/color_picker.cpp @@ -56,11 +56,10 @@ void ColorPicker::_notification(int p_what) { } break; case NOTIFICATION_VISIBILITY_CHANGED: { - if (get_parent()) { - Popup *p = get_parent()->cast_to<Popup>(); - if (p) - p->set_size(Size2(get_combined_minimum_size().width + get_constant("margin") * 2, get_combined_minimum_size().height + get_constant("margin") * 2)); - } + + Popup *p = Object::cast_to<Popup>(get_parent()); + if (p) + p->set_size(Size2(get_combined_minimum_size().width + get_constant("margin") * 2, get_combined_minimum_size().height + get_constant("margin") * 2)); } break; case MainLoop::NOTIFICATION_WM_QUIT_REQUEST: { |
