mirror of
https://github.com/godotengine/godot.git
synced 2025-12-08 06:09:55 +00:00
Optimize Animation::_track_update_hash
Co-Authored-By: Silc Lizard (Tokage) Renew <tokage.it.lab@gmail.com> Co-Authored-By: Luo Zhihao <luo_zhihao@outlook.com> Co-Authored-By: Lukas Tenbrink <lukas.tenbrink@gmail.com>
This commit is contained in:
parent
3defc856b0
commit
44856c81af
1 changed files with 3 additions and 3 deletions
|
|
@ -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 {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue