Skip to content

Commit b97aa0b

Browse files
TokageItLabRyan-000
andcommitted
Optimization NodePath
co-authored-by: Ryan-000 <[email protected]>
1 parent f5918a9 commit b97aa0b

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)