summaryrefslogtreecommitdiffstats
path: root/editor/rename_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/rename_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/rename_dialog.h')
-rw-r--r--editor/rename_dialog.h50
1 files changed, 25 insertions, 25 deletions
diff --git a/editor/rename_dialog.h b/editor/rename_dialog.h
index c9747795f0..d05e80fc04 100644
--- a/editor/rename_dialog.h
+++ b/editor/rename_dialog.h
@@ -62,41 +62,41 @@ class RenameDialog : public ConfirmationDialog {
void _update_preview_int(int new_value = 0);
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);
- SceneTreeEditor *scene_tree_editor;
- UndoRedo *undo_redo;
+ SceneTreeEditor *scene_tree_editor = nullptr;
+ UndoRedo *undo_redo = nullptr;
int global_count;
- LineEdit *lne_search;
- LineEdit *lne_replace;
- LineEdit *lne_prefix;
- LineEdit *lne_suffix;
+ LineEdit *lne_search = nullptr;
+ LineEdit *lne_replace = nullptr;
+ LineEdit *lne_prefix = nullptr;
+ LineEdit *lne_suffix = nullptr;
- TabContainer *tabc_features;
+ TabContainer *tabc_features = nullptr;
- CheckBox *cbut_substitute;
- CheckButton *cbut_regex;
- CheckBox *cbut_process;
- CheckBox *chk_per_level_counter;
+ CheckBox *cbut_substitute = nullptr;
+ CheckButton *cbut_regex = nullptr;
+ CheckBox *cbut_process = nullptr;
+ CheckBox *chk_per_level_counter = nullptr;
- Button *but_insert_name;
- Button *but_insert_parent;
- Button *but_insert_type;
- Button *but_insert_scene;
- Button *but_insert_root;
- Button *but_insert_count;
+ Button *but_insert_name = nullptr;
+ Button *but_insert_parent = nullptr;
+ Button *but_insert_type = nullptr;
+ Button *but_insert_scene = nullptr;
+ Button *but_insert_root = nullptr;
+ Button *but_insert_count = nullptr;
- SpinBox *spn_count_start;
- SpinBox *spn_count_step;
- SpinBox *spn_count_padding;
+ SpinBox *spn_count_start = nullptr;
+ SpinBox *spn_count_step = nullptr;
+ SpinBox *spn_count_padding = nullptr;
- OptionButton *opt_style;
- OptionButton *opt_case;
+ OptionButton *opt_style = nullptr;
+ OptionButton *opt_case = nullptr;
- Label *lbl_preview_title;
- Label *lbl_preview;
+ Label *lbl_preview_title = nullptr;
+ Label *lbl_preview = nullptr;
List<Pair<NodePath, String>> to_rename;
- Node *preview_node;
+ Node *preview_node = nullptr;
bool lock_preview_update;
ErrorHandlerList eh;
bool has_errors;