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/io_plugins/editor_texture_import_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 'editor/io_plugins/editor_texture_import_plugin.cpp')
| -rw-r--r-- | editor/io_plugins/editor_texture_import_plugin.cpp | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/editor/io_plugins/editor_texture_import_plugin.cpp b/editor/io_plugins/editor_texture_import_plugin.cpp index 1dc264147..943237764 100644 --- a/editor/io_plugins/editor_texture_import_plugin.cpp +++ b/editor/io_plugins/editor_texture_import_plugin.cpp @@ -703,7 +703,7 @@ EditorTextureImportDialog::EditorTextureImportDialog(EditorTextureImportPlugin* VBoxContainer *source_vb=memnew(VBoxContainer); MarginContainer *source_mc = vbc->add_margin_child(TTR("Source Texture(s):"),source_vb); - source_label = vbc->get_child(source_mc->get_index()-1)->cast_to<Label>(); + source_label = Object::cast_to<Label>(vbc->get_child(source_mc->get_index()-1)); HBoxContainer *hbc = memnew( HBoxContainer ); source_vb->add_child(hbc); @@ -733,7 +733,7 @@ EditorTextureImportDialog::EditorTextureImportDialog(EditorTextureImportPlugin* size->set_value(256); size_mc=vbc->add_margin_child(TTR("Cell Size:"),size); - size_label=vbc->get_child(size_mc->get_index()-1)->cast_to<Label>(); + size_label=Object::cast_to<Label>(vbc->get_child(size_mc->get_index()-1)); save_path = memnew( LineEdit ); @@ -1326,7 +1326,7 @@ Error EditorTextureImportPlugin::import2(const String& p_path, const Ref<Resourc if (ResourceCache::has(apath)) { - at = Ref<AtlasTexture>( ResourceCache::get(apath)->cast_to<AtlasTexture>() ); + at = Ref<AtlasTexture>( Object::cast_to<AtlasTexture>(ResourceCache::get(apath)) ); } else { at = Ref<AtlasTexture>( memnew( AtlasTexture ) ); @@ -1340,7 +1340,7 @@ Error EditorTextureImportPlugin::import2(const String& p_path, const Ref<Resourc } } if (ResourceCache::has(p_path)) { - texture = Ref<ImageTexture> ( ResourceCache::get(p_path)->cast_to<ImageTexture>() ); + texture = Ref<ImageTexture> ( Object::cast_to<ImageTexture>(ResourceCache::get(p_path)) ); } else { texture = Ref<ImageTexture>( memnew( ImageTexture ) ); } @@ -1354,7 +1354,7 @@ Error EditorTextureImportPlugin::import2(const String& p_path, const Ref<Resourc if (ResourceCache::has(p_path)) { Resource *r = ResourceCache::get(p_path); - texture = Ref<ImageTexture> ( r->cast_to<ImageTexture>() ); + texture = Ref<ImageTexture> ( Object::cast_to<ImageTexture>(r) ); Image img; Error err = img.load(src_path); |
