You've already forked godot
mirror of
https://github.com/godotengine/godot.git
synced 2025-11-04 12:00:25 +00:00
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.
This commit is contained in:
@@ -65,34 +65,34 @@ public:
|
||||
static RegisterFunc unregister_func;
|
||||
|
||||
private:
|
||||
ConfirmationDialog *makedialog;
|
||||
LineEdit *makedirname;
|
||||
ConfirmationDialog *makedialog = nullptr;
|
||||
LineEdit *makedirname = nullptr;
|
||||
|
||||
Button *makedir;
|
||||
Button *makedir = nullptr;
|
||||
Access access = ACCESS_RESOURCES;
|
||||
VBoxContainer *vbox;
|
||||
VBoxContainer *vbox = nullptr;
|
||||
FileMode mode;
|
||||
LineEdit *dir;
|
||||
HBoxContainer *drives_container;
|
||||
HBoxContainer *shortcuts_container;
|
||||
OptionButton *drives;
|
||||
Tree *tree;
|
||||
HBoxContainer *file_box;
|
||||
LineEdit *file;
|
||||
OptionButton *filter;
|
||||
AcceptDialog *mkdirerr;
|
||||
AcceptDialog *exterr;
|
||||
DirAccess *dir_access;
|
||||
ConfirmationDialog *confirm_save;
|
||||
LineEdit *dir = nullptr;
|
||||
HBoxContainer *drives_container = nullptr;
|
||||
HBoxContainer *shortcuts_container = nullptr;
|
||||
OptionButton *drives = nullptr;
|
||||
Tree *tree = nullptr;
|
||||
HBoxContainer *file_box = nullptr;
|
||||
LineEdit *file = nullptr;
|
||||
OptionButton *filter = nullptr;
|
||||
AcceptDialog *mkdirerr = nullptr;
|
||||
AcceptDialog *exterr = nullptr;
|
||||
DirAccess *dir_access = nullptr;
|
||||
ConfirmationDialog *confirm_save = nullptr;
|
||||
|
||||
Label *message;
|
||||
Label *message = nullptr;
|
||||
|
||||
Button *dir_prev;
|
||||
Button *dir_next;
|
||||
Button *dir_up;
|
||||
Button *dir_prev = nullptr;
|
||||
Button *dir_next = nullptr;
|
||||
Button *dir_up = nullptr;
|
||||
|
||||
Button *refresh;
|
||||
Button *show_hidden;
|
||||
Button *refresh = nullptr;
|
||||
Button *show_hidden = nullptr;
|
||||
|
||||
Vector<String> filters;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user