diff options
Diffstat (limited to 'core/node_path.h')
-rw-r--r-- | core/node_path.h | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/core/node_path.h b/core/node_path.h index 76de36cd9f..7c06bf01ce 100644 --- a/core/node_path.h +++ b/core/node_path.h @@ -35,9 +35,7 @@ #include "core/ustring.h" class NodePath { - struct Data { - SafeRefCount refcount; Vector<StringName> path; Vector<StringName> subpath; @@ -48,7 +46,7 @@ class NodePath { mutable uint32_t hash_cache; }; - mutable Data *data; + mutable Data *data = nullptr; void unref(); void _update_hash_cache() const; @@ -71,8 +69,9 @@ public: NodePath get_parent() const; _FORCE_INLINE_ uint32_t hash() const { - if (!data) + if (!data) { return 0; + } if (!data->hash_cache_valid) { _update_hash_cache(); } @@ -93,7 +92,7 @@ public: NodePath(const Vector<StringName> &p_path, const Vector<StringName> &p_subpath, bool p_absolute); NodePath(const NodePath &p_path); NodePath(const String &p_path); - NodePath(); + NodePath() {} ~NodePath(); }; |