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 /editor/plugins/texture_region_editor_plugin.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 '')
| -rw-r--r-- | editor/plugins/texture_region_editor_plugin.cpp | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/editor/plugins/texture_region_editor_plugin.cpp b/editor/plugins/texture_region_editor_plugin.cpp index d878bba42..d9e310a58 100644 --- a/editor/plugins/texture_region_editor_plugin.cpp +++ b/editor/plugins/texture_region_editor_plugin.cpp @@ -626,12 +626,12 @@ void TextureRegionEditor::edit(Object *p_obj) { if (atlas_tex.is_valid()) atlas_tex->remove_change_receptor(this); if (p_obj) { - node_sprite = p_obj->cast_to<Sprite>(); - node_patch9 = p_obj->cast_to<NinePatchRect>(); - if (p_obj->cast_to<StyleBoxTexture>()) - obj_styleBox = Ref<StyleBoxTexture>(p_obj->cast_to<StyleBoxTexture>()); - if (p_obj->cast_to<AtlasTexture>()) - atlas_tex = Ref<AtlasTexture>(p_obj->cast_to<AtlasTexture>()); + node_sprite = Object::cast_to<Sprite>(p_obj); + node_patch9 = Object::cast_to<NinePatchRect>(p_obj); + if (Object::cast_to<StyleBoxTexture>(p_obj)) + obj_styleBox = Ref<StyleBoxTexture>(Object::cast_to<StyleBoxTexture>(p_obj)); + if (Object::cast_to<AtlasTexture>(p_obj)) + atlas_tex = Ref<AtlasTexture>(Object::cast_to<AtlasTexture>(p_obj)); p_obj->add_change_receptor(this); _edit_region(); } else { |
