summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorYuri Sizov <11782833+YuriSizov@users.noreply.github.com>2023-05-18 18:42:19 +0200
committerGitHub <noreply@github.com>2023-05-18 18:42:19 +0200
commit77991a048c2c128b5c838b1e8e66993e0314474f (patch)
tree486a45652f632797bea9a6132edde18d8052fdb0
parentdca343aabbaf5af0704df9bdbb64cce1faac6d55 (diff)
parentd2ddd8b228a5d735a334f7c58660d1aff89d09f1 (diff)
downloadredot-engine-77991a048c2c128b5c838b1e8e66993e0314474f.tar.gz
Merge pull request #77197 from AThousandShips/string_name_cmp
Fix `StringName` comparison
-rw-r--r--core/string/string_name.h9
1 files changed, 9 insertions, 0 deletions
diff --git a/core/string/string_name.h b/core/string/string_name.h
index 07abc781a2..4ed58d8286 100644
--- a/core/string/string_name.h
+++ b/core/string/string_name.h
@@ -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