Merge pull request #110400 from Ryan-000/Optimize-Animation_track_update_hash

Optimize Animation::_track_update_hash
This commit is contained in:
Thaddeus Crews 2025-10-27 10:01:45 -05:00
commit b72937587a
No known key found for this signature in database
GPG key ID: 8C6E5FEB5FC03CCC

View file

@ -1062,9 +1062,9 @@ Animation::TrackType Animation::get_cache_type(TrackType p_type) {
}
void Animation::_track_update_hash(int p_track) {
NodePath track_path = tracks[p_track]->path;
TrackType track_cache_type = get_cache_type(tracks[p_track]->type);
tracks[p_track]->thash = StringName(String(track_path.get_concatenated_names()) + String(track_path.get_concatenated_subnames()) + itos(track_cache_type)).hash();
const NodePath &track_path = tracks[p_track]->path;
const TrackType track_cache_type = get_cache_type(tracks[p_track]->type);
tracks[p_track]->thash = HashMapHasherDefault::hash(Pair<const NodePath &, TrackType>(track_path, track_cache_type));
}
Animation::TypeHash Animation::track_get_type_hash(int p_track) const {