mirror of
https://github.com/Redot-Engine/redot-engine.git
synced 2025-12-06 15:21:56 -05:00
StringName: operator== compares in-place
This commit is contained in:
@@ -60,6 +60,11 @@ class StringName {
|
||||
uint32_t debug_references = 0;
|
||||
#endif
|
||||
String get_name() const { return cname ? String(cname) : name; }
|
||||
bool operator==(const String &p_name) const;
|
||||
bool operator!=(const String &p_name) const;
|
||||
bool operator==(const char *p_name) const;
|
||||
bool operator!=(const char *p_name) const;
|
||||
|
||||
int idx = 0;
|
||||
uint32_t hash = 0;
|
||||
_Data *prev = nullptr;
|
||||
@@ -99,6 +104,10 @@ public:
|
||||
bool operator!=(const String &p_name) const;
|
||||
bool operator!=(const char *p_name) const;
|
||||
|
||||
char32_t operator[](int p_index) const;
|
||||
int length() const;
|
||||
bool is_empty() const;
|
||||
|
||||
_FORCE_INLINE_ bool is_node_unique_name() const {
|
||||
if (!_data) {
|
||||
return false;
|
||||
@@ -175,7 +184,7 @@ public:
|
||||
}
|
||||
};
|
||||
|
||||
void operator=(const StringName &p_name);
|
||||
StringName &operator=(const StringName &p_name);
|
||||
StringName(const char *p_name, bool p_static = false);
|
||||
StringName(const StringName &p_name);
|
||||
StringName(const String &p_name, bool p_static = false);
|
||||
|
||||
Reference in New Issue
Block a user