summaryrefslogtreecommitdiff
path: root/core/string_db.h
diff options
context:
space:
mode:
Diffstat (limited to 'core/string_db.h')
-rw-r--r--core/string_db.h17
1 files changed, 16 insertions, 1 deletions
diff --git a/core/string_db.h b/core/string_db.h
index de91e2abd8..9665198ecd 100644
--- a/core/string_db.h
+++ b/core/string_db.h
@@ -138,7 +138,22 @@ public:
_FORCE_INLINE_ bool operator()(const StringName &l, const StringName &r) const {
- return l.operator String() < r.operator String();
+ const char *l_cname = l._data ? l._data->cname : "";
+ const char *r_cname = r._data ? r._data->cname : "";
+
+ if (l_cname) {
+
+ if (r_cname)
+ return is_str_less(l_cname, r_cname);
+ else
+ return is_str_less(l_cname, r._data->name.ptr());
+ } else {
+
+ if (r_cname)
+ return is_str_less(l._data->name.ptr(), r_cname);
+ else
+ return is_str_less(l._data->name.ptr(), r._data->name.ptr());
+ }
}
};