diff options
author | Rémi Verschelde <rverschelde@gmail.com> | 2022-04-04 15:06:57 +0200 |
---|---|---|
committer | Rémi Verschelde <rverschelde@gmail.com> | 2022-04-04 19:49:50 +0200 |
commit | f8ab79e68af20e18e1d868b64d6dfd0c429bc554 (patch) | |
tree | a9d2df2e2df939c189135b1c36a01e06b37b80b2 /editor/localization_editor.h | |
parent | 53317bbe146dd19a919685df8d846c55568daba1 (diff) | |
download | redot-engine-f8ab79e68af20e18e1d868b64d6dfd0c429bc554.tar.gz |
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.
Diffstat (limited to 'editor/localization_editor.h')
-rw-r--r-- | editor/localization_editor.h | 24 |
1 files changed, 12 insertions, 12 deletions
diff --git a/editor/localization_editor.h b/editor/localization_editor.h index 3424ba7c55..966ef0f36e 100644 --- a/editor/localization_editor.h +++ b/editor/localization_editor.h @@ -40,22 +40,22 @@ class EditorFileDialog; class LocalizationEditor : public VBoxContainer { GDCLASS(LocalizationEditor, VBoxContainer); - Tree *translation_list; + Tree *translation_list = nullptr; - EditorLocaleDialog *locale_select; - EditorFileDialog *translation_file_open; + EditorLocaleDialog *locale_select = nullptr; + EditorFileDialog *translation_file_open = nullptr; - Button *translation_res_option_add_button; - EditorFileDialog *translation_res_file_open_dialog; - EditorFileDialog *translation_res_option_file_open_dialog; - Tree *translation_remap; - Tree *translation_remap_options; + Button *translation_res_option_add_button = nullptr; + EditorFileDialog *translation_res_file_open_dialog = nullptr; + EditorFileDialog *translation_res_option_file_open_dialog = nullptr; + Tree *translation_remap = nullptr; + Tree *translation_remap_options = nullptr; - Tree *translation_pot_list; - EditorFileDialog *pot_file_open_dialog; - EditorFileDialog *pot_generate_dialog; + Tree *translation_pot_list = nullptr; + EditorFileDialog *pot_file_open_dialog = nullptr; + EditorFileDialog *pot_generate_dialog = nullptr; - UndoRedo *undo_redo; + UndoRedo *undo_redo = nullptr; bool updating_translations = false; String localization_changed; |