Merge pull request #77197 from AThousandShips/string_name_cmp

Fix `StringName` comparison
This commit is contained in:
Yuri Sizov 2023-05-18 18:42:19 +02:00 committed by GitHub
commit 77991a048c
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -117,6 +117,15 @@ public:
_FORCE_INLINE_ bool operator<(const StringName &p_name) const {
return _data < p_name._data;
}
_FORCE_INLINE_ bool operator<=(const StringName &p_name) const {
return _data <= p_name._data;
}
_FORCE_INLINE_ bool operator>(const StringName &p_name) const {
return _data > p_name._data;
}
_FORCE_INLINE_ bool operator>=(const StringName &p_name) const {
return _data >= p_name._data;
}
_FORCE_INLINE_ bool operator==(const StringName &p_name) const {
// the real magic of all this mess happens here.
// this is why path comparisons are very fast