summaryrefslogtreecommitdiffstats
path: root/editor/plugins/animation_tree_editor_plugin.cpp
diff options
context:
space:
mode:
authorRémi Verschelde <rverschelde@gmail.com>2017-08-25 08:37:38 +0200
committerGitHub <noreply@github.com>2017-08-25 08:37:38 +0200
commit490aef93699abc00da58f73b1596fb3473fd53c6 (patch)
tree7912c7a540eca6b09392bbd2aa2f30fefe37f51a /editor/plugins/animation_tree_editor_plugin.cpp
parentb1c0e45b03aa14453846c9a888763077eef2476b (diff)
parentcacced7e507f7603bacc03ae2616e58f0ede122a (diff)
downloadredot-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_tree_editor_plugin.cpp')
-rw-r--r--editor/plugins/animation_tree_editor_plugin.cpp8
1 files changed, 4 insertions, 4 deletions
diff --git a/editor/plugins/animation_tree_editor_plugin.cpp b/editor/plugins/animation_tree_editor_plugin.cpp
index 55975bdefa..9d150150a1 100644
--- a/editor/plugins/animation_tree_editor_plugin.cpp
+++ b/editor/plugins/animation_tree_editor_plugin.cpp
@@ -281,9 +281,9 @@ void AnimationTreeEditor::_popup_edit_dialog() {
case AnimationTreePlayer::NODE_ANIMATION:
- if (anim_tree->get_master_player() != NodePath() && anim_tree->has_node(anim_tree->get_master_player()) && anim_tree->get_node(anim_tree->get_master_player())->cast_to<AnimationPlayer>()) {
+ if (anim_tree->get_master_player() != NodePath() && anim_tree->has_node(anim_tree->get_master_player()) && Object::cast_to<AnimationPlayer>(anim_tree->get_node(anim_tree->get_master_player()))) {
- AnimationPlayer *ap = anim_tree->get_node(anim_tree->get_master_player())->cast_to<AnimationPlayer>();
+ AnimationPlayer *ap = Object::cast_to<AnimationPlayer>(anim_tree->get_node(anim_tree->get_master_player()));
master_anim_popup->clear();
master_anim_popup->add_item("Edit Filters");
master_anim_popup->add_separator();
@@ -1233,7 +1233,7 @@ void AnimationTreeEditor::_edit_filters() {
if (np.get_property() != StringName()) {
Node *n = base->get_node(np);
- Skeleton *s = n->cast_to<Skeleton>();
+ Skeleton *s = Object::cast_to<Skeleton>(n);
if (s) {
String skelbase = E->get().substr(0, E->get().find(":"));
@@ -1439,7 +1439,7 @@ AnimationTreeEditor::AnimationTreeEditor() {
void AnimationTreeEditorPlugin::edit(Object *p_object) {
- anim_tree_editor->edit(p_object->cast_to<AnimationTreePlayer>());
+ anim_tree_editor->edit(Object::cast_to<AnimationTreePlayer>(p_object));
}
bool AnimationTreeEditorPlugin::handles(Object *p_object) const {