mirror of
https://github.com/godotengine/godot.git
synced 2025-10-19 16:03:29 +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:
parent
53317bbe14
commit
f8ab79e68a
258 changed files with 2398 additions and 2421 deletions
|
@ -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();
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue