summaryrefslogtreecommitdiffstats
path: root/editor/script_create_dialog.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/script_create_dialog.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/script_create_dialog.h')
-rw-r--r--editor/script_create_dialog.h44
1 files changed, 22 insertions, 22 deletions
diff --git a/editor/script_create_dialog.h b/editor/script_create_dialog.h
index e9f634e2c0..c7d8cfc38a 100644
--- a/editor/script_create_dialog.h
+++ b/editor/script_create_dialog.h
@@ -45,27 +45,27 @@ class EditorFileDialog;
class ScriptCreateDialog : public ConfirmationDialog {
GDCLASS(ScriptCreateDialog, ConfirmationDialog);
- LineEdit *class_name;
- Label *error_label;
- Label *path_error_label;
- Label *builtin_warning_label;
- Label *script_name_warning_label;
- Label *template_info_label;
- PanelContainer *status_panel;
- LineEdit *parent_name;
- Button *parent_browse_button;
- Button *parent_search_button;
- OptionButton *language_menu;
- OptionButton *template_menu;
- LineEdit *file_path;
- LineEdit *internal_name;
- Button *path_button;
- EditorFileDialog *file_browse;
- CheckBox *internal;
- CheckBox *use_templates;
- VBoxContainer *path_vb;
- AcceptDialog *alert;
- CreateDialog *select_class;
+ LineEdit *class_name = nullptr;
+ Label *error_label = nullptr;
+ Label *path_error_label = nullptr;
+ Label *builtin_warning_label = nullptr;
+ Label *script_name_warning_label = nullptr;
+ Label *template_info_label = nullptr;
+ PanelContainer *status_panel = nullptr;
+ LineEdit *parent_name = nullptr;
+ Button *parent_browse_button = nullptr;
+ Button *parent_search_button = nullptr;
+ OptionButton *language_menu = nullptr;
+ OptionButton *template_menu = nullptr;
+ LineEdit *file_path = nullptr;
+ LineEdit *internal_name = nullptr;
+ Button *path_button = nullptr;
+ EditorFileDialog *file_browse = nullptr;
+ CheckBox *internal = nullptr;
+ CheckBox *use_templates = nullptr;
+ VBoxContainer *path_vb = nullptr;
+ AcceptDialog *alert = nullptr;
+ CreateDialog *select_class = nullptr;
bool is_browsing_parent = false;
String template_inactive_message;
String initial_bp;
@@ -89,7 +89,7 @@ class ScriptCreateDialog : public ConfirmationDialog {
Control *name_controls[2];
Vector<ScriptLanguage::ScriptTemplate> template_list;
- ScriptLanguage *language;
+ ScriptLanguage *language = nullptr;
String base_type;