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/editor_file_dialog.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/editor_file_dialog.h')
-rw-r--r-- | editor/editor_file_dialog.h | 78 |
1 files changed, 39 insertions, 39 deletions
diff --git a/editor/editor_file_dialog.h b/editor/editor_file_dialog.h index a747255ce8..07af8c5435 100644 --- a/editor/editor_file_dialog.h +++ b/editor/editor_file_dialog.h @@ -84,50 +84,50 @@ private: ITEM_MENU_SHOW_IN_EXPLORER }; - ConfirmationDialog *makedialog; - LineEdit *makedirname; + ConfirmationDialog *makedialog = nullptr; + LineEdit *makedirname = nullptr; - Button *makedir; + Button *makedir = nullptr; Access access; - VBoxContainer *vbox; + VBoxContainer *vbox = nullptr; FileMode mode; bool can_create_dir; - LineEdit *dir; - - Button *dir_prev; - Button *dir_next; - Button *dir_up; - - HBoxContainer *drives_container; - HBoxContainer *shortcuts_container; - OptionButton *drives; - ItemList *item_list; - PopupMenu *item_menu; - TextureRect *preview; - VBoxContainer *preview_vb; - HSplitContainer *list_hb; - HBoxContainer *file_box; - LineEdit *file; - OptionButton *filter; - AcceptDialog *error_dialog; - DirAccess *dir_access; - ConfirmationDialog *confirm_save; - DependencyRemoveDialog *dep_remove_dialog; - ConfirmationDialog *global_remove_dialog; - - Button *mode_thumbnails; - Button *mode_list; - - Button *refresh; - Button *favorite; - Button *show_hidden; - - Button *fav_up; - Button *fav_down; - - ItemList *favorites; - ItemList *recent; + LineEdit *dir = nullptr; + + Button *dir_prev = nullptr; + Button *dir_next = nullptr; + Button *dir_up = nullptr; + + HBoxContainer *drives_container = nullptr; + HBoxContainer *shortcuts_container = nullptr; + OptionButton *drives = nullptr; + ItemList *item_list = nullptr; + PopupMenu *item_menu = nullptr; + TextureRect *preview = nullptr; + VBoxContainer *preview_vb = nullptr; + HSplitContainer *list_hb = nullptr; + HBoxContainer *file_box = nullptr; + LineEdit *file = nullptr; + OptionButton *filter = nullptr; + AcceptDialog *error_dialog = nullptr; + DirAccess *dir_access = nullptr; + ConfirmationDialog *confirm_save = nullptr; + DependencyRemoveDialog *dep_remove_dialog = nullptr; + ConfirmationDialog *global_remove_dialog = nullptr; + + Button *mode_thumbnails = nullptr; + Button *mode_list = nullptr; + + Button *refresh = nullptr; + Button *favorite = nullptr; + Button *show_hidden = nullptr; + + Button *fav_up = nullptr; + Button *fav_down = nullptr; + + ItemList *favorites = nullptr; + ItemList *recent = nullptr; Vector<String> local_history; int local_history_pos; |