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:
Rémi Verschelde
2022-04-04 15:06:57 +02:00
parent 53317bbe14
commit f8ab79e68a
258 changed files with 2398 additions and 2421 deletions

View File

@ -117,23 +117,23 @@ private:
// Maps MessageTypes to LogFilters for convenient access and storage (don't need 1 member per filter).
Map<MessageType, LogFilter *> type_filter_map;
RichTextLabel *log;
RichTextLabel *log = nullptr;
Button *clear_button;
Button *copy_button;
Button *clear_button = nullptr;
Button *copy_button = nullptr;
Button *collapse_button;
Button *collapse_button = nullptr;
bool collapse = false;
Button *show_search_button;
LineEdit *search_box;
Button *show_search_button = nullptr;
LineEdit *search_box = nullptr;
// Reference to the "Output" button on the toolbar so we can update it's icon when
// Warnings or Errors are encounetered.
Button *tool_button;
Button *tool_button = nullptr;
bool is_loading_state = false; // Used to disable saving requests while loading (some signals from buttons will try trigger a save, which happens during loading).
Timer *save_state_timer;
Timer *save_state_timer = nullptr;
static void _error_handler(void *p_self, const char *p_func, const char *p_file, int p_line, const char *p_error, const char *p_errorexp, bool p_editor_notify, ErrorHandlerType p_type);