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:
Rémi Verschelde 2022-04-04 15:06:57 +02:00
parent 53317bbe14
commit f8ab79e68a
258 changed files with 2398 additions and 2421 deletions

View file

@ -40,7 +40,7 @@
class Path3DGizmo : public EditorNode3DGizmo {
GDCLASS(Path3DGizmo, EditorNode3DGizmo);
Path3D *path;
Path3D *path = nullptr;
mutable Vector3 original;
mutable float orig_in_length;
mutable float orig_out_length;
@ -70,14 +70,14 @@ public:
class Path3DEditorPlugin : public EditorPlugin {
GDCLASS(Path3DEditorPlugin, EditorPlugin);
Separator *sep;
Button *curve_create;
Button *curve_edit;
Button *curve_del;
Button *curve_close;
MenuButton *handle_menu;
Separator *sep = nullptr;
Button *curve_create = nullptr;
Button *curve_edit = nullptr;
Button *curve_del = nullptr;
Button *curve_close = nullptr;
MenuButton *handle_menu = nullptr;
Path3D *path;
Path3D *path = nullptr;
void _update_theme();