Zero initialize all pointer class and struct members
This prevents the pitfall of UB when checking if they have been assigned something valid by comparing to nullptr.
This commit is contained in:
@ -70,7 +70,7 @@ class StringName {
|
||||
_Data *_data = nullptr;
|
||||
|
||||
union _HashUnion {
|
||||
_Data *ptr;
|
||||
_Data *ptr = nullptr;
|
||||
uint32_t hash;
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user