diff options
| author | Rémi Verschelde <rverschelde@gmail.com> | 2017-08-25 08:37:38 +0200 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2017-08-25 08:37:38 +0200 |
| commit | 490aef93699abc00da58f73b1596fb3473fd53c6 (patch) | |
| tree | 7912c7a540eca6b09392bbd2aa2f30fefe37f51a /editor/plugins/animation_player_editor_plugin.cpp | |
| parent | b1c0e45b03aa14453846c9a888763077eef2476b (diff) | |
| parent | cacced7e507f7603bacc03ae2616e58f0ede122a (diff) | |
| download | redot-engine-490aef93699abc00da58f73b1596fb3473fd53c6.tar.gz | |
Merge pull request #10581 from hpvb/fix-gcc6+
Make cast_to a static member of Object.
Diffstat (limited to 'editor/plugins/animation_player_editor_plugin.cpp')
| -rw-r--r-- | editor/plugins/animation_player_editor_plugin.cpp | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/editor/plugins/animation_player_editor_plugin.cpp b/editor/plugins/animation_player_editor_plugin.cpp index ecae272b6d..a1fec795f8 100644 --- a/editor/plugins/animation_player_editor_plugin.cpp +++ b/editor/plugins/animation_player_editor_plugin.cpp @@ -656,8 +656,8 @@ void AnimationPlayerEditor::set_state(const Dictionary &p_state) { return; Node *n = EditorNode::get_singleton()->get_edited_scene()->get_node(p_state["player"]); - if (n && n->cast_to<AnimationPlayer>() && EditorNode::get_singleton()->get_editor_selection()->is_selected(n)) { - player = n->cast_to<AnimationPlayer>(); + if (Object::cast_to<AnimationPlayer>(n) && EditorNode::get_singleton()->get_editor_selection()->is_selected(n)) { + player = Object::cast_to<AnimationPlayer>(n); _update_player(); show(); set_process(true); @@ -737,9 +737,9 @@ void AnimationPlayerEditor::_dialog_action(String p_file) { if (current != "") { Ref<Animation> anim = player->get_animation(current); - ERR_FAIL_COND(!anim->cast_to<Resource>()) + ERR_FAIL_COND(!Object::cast_to<Resource>(*anim)) - RES current_res = RES(anim->cast_to<Resource>()); + RES current_res = RES(Object::cast_to<Resource>(*anim)); _animation_save_in_path(current_res, p_file); } @@ -1461,7 +1461,7 @@ void AnimationPlayerEditorPlugin::edit(Object *p_object) { anim_editor->set_undo_redo(&get_undo_redo()); if (!p_object) return; - anim_editor->edit(p_object->cast_to<AnimationPlayer>()); + anim_editor->edit(Object::cast_to<AnimationPlayer>(p_object)); } bool AnimationPlayerEditorPlugin::handles(Object *p_object) const { |
