Skip to content

Commit 51d5a17

Browse files
committed
Merge pull request #113447 from TokageItLab/opt-nodepath
Optimize NodePath
2 parents bf10def + b97aa0b commit 51d5a17

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

core/string/node_path.cpp

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -117,6 +117,12 @@ bool NodePath::operator==(const NodePath &p_path) const {
117117
return false;
118118
}
119119

120+
if (data->hash_cache_valid && p_path.data->hash_cache_valid) {
121+
if (data->hash_cache != p_path.data->hash_cache) {
122+
return false;
123+
}
124+
}
125+
120126
if (data->absolute != p_path.data->absolute) {
121127
return false;
122128
}

0 commit comments

Comments
 (0)