summaryrefslogtreecommitdiffstats
path: root/editor/localization_editor.h
diff options
context:
space:
mode:
authorRémi Verschelde <rverschelde@gmail.com>2022-04-04 15:06:57 +0200
committerRémi Verschelde <rverschelde@gmail.com>2022-04-04 19:49:50 +0200
commitf8ab79e68af20e18e1d868b64d6dfd0c429bc554 (patch)
treea9d2df2e2df939c189135b1c36a01e06b37b80b2 /editor/localization_editor.h
parent53317bbe146dd19a919685df8d846c55568daba1 (diff)
downloadredot-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.h24
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;