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/animation/animation_tree_player.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/animation/animation_tree_player.cpp')
| -rw-r--r-- | scene/animation/animation_tree_player.cpp | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/scene/animation/animation_tree_player.cpp b/scene/animation/animation_tree_player.cpp index fd8b33e66..1c4a66a60 100644 --- a/scene/animation/animation_tree_player.cpp +++ b/scene/animation/animation_tree_player.cpp @@ -1487,8 +1487,8 @@ AnimationTreePlayer::Track *AnimationTreePlayer::_find_track(const NodePath &p_p if (p_path.get_property()) { - if (child->cast_to<Skeleton>()) - bone_idx = child->cast_to<Skeleton>()->find_bone(p_path.get_property()); + if (Object::cast_to<Skeleton>(child)) + bone_idx = Object::cast_to<Skeleton>(child)->find_bone(p_path.get_property()); if (bone_idx == -1) property = p_path.get_property(); } @@ -1503,8 +1503,8 @@ AnimationTreePlayer::Track *AnimationTreePlayer::_find_track(const NodePath &p_p Track tr; tr.id = id; tr.object = resource.is_valid() ? (Object *)resource.ptr() : (Object *)child; - tr.skeleton = child->cast_to<Skeleton>(); - tr.spatial = child->cast_to<Spatial>(); + tr.skeleton = Object::cast_to<Skeleton>(child); + tr.spatial = Object::cast_to<Spatial>(child); tr.bone_idx = bone_idx; tr.property = property; @@ -1644,7 +1644,7 @@ void AnimationTreePlayer::_update_sources() { ERR_FAIL_COND(!m); } - AnimationPlayer *ap = m->cast_to<AnimationPlayer>(); + AnimationPlayer *ap = Object::cast_to<AnimationPlayer>(m); if (!ap) { |
