Skip to content

Commit b729375

Browse files
committed
Merge pull request #110400 from Ryan-000/Optimize-Animation_track_update_hash
Optimize Animation::_track_update_hash
2 parents 9928e86 + 44856c8 commit b729375

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

scene/resources/animation.cpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1062,9 +1062,9 @@ Animation::TrackType Animation::get_cache_type(TrackType p_type) {
10621062
}
10631063

10641064
void Animation::_track_update_hash(int p_track) {
1065-
NodePath track_path = tracks[p_track]->path;
1066-
TrackType track_cache_type = get_cache_type(tracks[p_track]->type);
1067-
tracks[p_track]->thash = StringName(String(track_path.get_concatenated_names()) + String(track_path.get_concatenated_subnames()) + itos(track_cache_type)).hash();
1065+
const NodePath &track_path = tracks[p_track]->path;
1066+
const TrackType track_cache_type = get_cache_type(tracks[p_track]->type);
1067+
tracks[p_track]->thash = HashMapHasherDefault::hash(Pair<const NodePath &, TrackType>(track_path, track_cache_type));
10681068
}
10691069

10701070
Animation::TypeHash Animation::track_get_type_hash(int p_track) const {

0 commit comments

Comments
 (0)