summaryrefslogtreecommitdiff
path: root/core/string_name.h
diff options
context:
space:
mode:
Diffstat (limited to 'core/string_name.h')
-rw-r--r--core/string_name.h21
1 files changed, 8 insertions, 13 deletions
diff --git a/core/string_name.h b/core/string_name.h
index aec87b8e66..5f69f3a235 100644
--- a/core/string_name.h
+++ b/core/string_name.h
@@ -52,25 +52,20 @@ class StringName {
struct _Data {
SafeRefCount refcount;
- const char *cname;
+ const char *cname = nullptr;
String name;
String get_name() const { return cname ? String(cname) : name; }
- int idx;
- uint32_t hash;
- _Data *prev;
- _Data *next;
- _Data() {
- cname = nullptr;
- next = prev = nullptr;
- idx = 0;
- hash = 0;
- }
+ int idx = 0;
+ uint32_t hash = 0;
+ _Data *prev = nullptr;
+ _Data *next = nullptr;
+ _Data() {}
};
static _Data *_table[STRING_TABLE_LEN];
- _Data *_data;
+ _Data *_data = nullptr;
union _HashUnion {
@@ -160,7 +155,7 @@ public:
StringName(const StringName &p_name);
StringName(const String &p_name);
StringName(const StaticCString &p_static_string);
- StringName();
+ StringName() {}
~StringName();
};