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:
@ -62,10 +62,10 @@ class MessageQueue {
|
||||
};
|
||||
};
|
||||
|
||||
uint8_t *buffer;
|
||||
uint8_t *buffer = nullptr;
|
||||
uint32_t buffer_end = 0;
|
||||
uint32_t buffer_max_used = 0;
|
||||
uint32_t buffer_size;
|
||||
uint32_t buffer_size = 0;
|
||||
|
||||
void _call_function(const Callable &p_callable, const Variant *p_args, int p_argcount, bool p_show_error);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user