mirror of
https://github.com/godotengine/godot.git
synced 2025-01-23 19:12:24 -05:00
Fix various uninitialized member pointers
Using this command: ``` find -name "thirdparty" -prune -o -name "*.h" -exec sed -i {} -e '/return /! s/\t\([A-Za-z0-9_]* \*[A-Za-z0-9_]*\)\;/\t\1 = nullptr;/g' \; ``` And then reviewing the changes manually to discard the ones that don't seem correct/safe/good (notably changes to `core` unions).
This commit is contained in:
parent
c36735ef97
commit
7b5d1ea5b9
8 changed files with 22 additions and 22 deletions
|
@ -597,7 +597,7 @@ protected:
|
||||||
public:
|
public:
|
||||||
static RasterizerSceneGLES3 *get_singleton() { return singleton; }
|
static RasterizerSceneGLES3 *get_singleton() { return singleton; }
|
||||||
|
|
||||||
RasterizerCanvasGLES3 *canvas;
|
RasterizerCanvasGLES3 *canvas = nullptr;
|
||||||
|
|
||||||
RenderGeometryInstance *geometry_instance_create(RID p_base) override;
|
RenderGeometryInstance *geometry_instance_create(RID p_base) override;
|
||||||
void geometry_instance_free(RenderGeometryInstance *p_geometry_instance) override;
|
void geometry_instance_free(RenderGeometryInstance *p_geometry_instance) override;
|
||||||
|
|
|
@ -151,7 +151,7 @@ class EditorPropertyDictionary : public EditorProperty {
|
||||||
Button *edit = nullptr;
|
Button *edit = nullptr;
|
||||||
MarginContainer *container = nullptr;
|
MarginContainer *container = nullptr;
|
||||||
VBoxContainer *property_vbox = nullptr;
|
VBoxContainer *property_vbox = nullptr;
|
||||||
EditorSpinSlider *size_sliderv;
|
EditorSpinSlider *size_sliderv = nullptr;
|
||||||
Button *button_add_item = nullptr;
|
Button *button_add_item = nullptr;
|
||||||
EditorPaginator *paginator = nullptr;
|
EditorPaginator *paginator = nullptr;
|
||||||
|
|
||||||
|
|
|
@ -192,7 +192,7 @@ class SceneImportSettings : public ConfirmationDialog {
|
||||||
|
|
||||||
bool editing_animation = false;
|
bool editing_animation = false;
|
||||||
|
|
||||||
Timer *update_view_timer;
|
Timer *update_view_timer = nullptr;
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
void _notification(int p_what);
|
void _notification(int p_what);
|
||||||
|
|
|
@ -100,8 +100,8 @@ class AnimationNodeStateMachineEditor : public AnimationTreeNodeEditorPlugin {
|
||||||
|
|
||||||
Vector2 add_node_pos;
|
Vector2 add_node_pos;
|
||||||
|
|
||||||
ConfirmationDialog *delete_window;
|
ConfirmationDialog *delete_window = nullptr;
|
||||||
Tree *delete_tree;
|
Tree *delete_tree = nullptr;
|
||||||
|
|
||||||
bool box_selecting = false;
|
bool box_selecting = false;
|
||||||
Point2 box_selecting_from;
|
Point2 box_selecting_from;
|
||||||
|
|
|
@ -62,7 +62,7 @@ private:
|
||||||
bool selected = false;
|
bool selected = false;
|
||||||
bool require = false;
|
bool require = false;
|
||||||
|
|
||||||
TextureRect *circle;
|
TextureRect *circle = nullptr;
|
||||||
|
|
||||||
void fetch_textures();
|
void fetch_textures();
|
||||||
|
|
||||||
|
@ -87,8 +87,8 @@ class BoneMapperItem : public VBoxContainer {
|
||||||
|
|
||||||
Ref<BoneMap> bone_map;
|
Ref<BoneMap> bone_map;
|
||||||
|
|
||||||
EditorPropertyText *skeleton_bone_selector;
|
EditorPropertyText *skeleton_bone_selector = nullptr;
|
||||||
Button *picker_button;
|
Button *picker_button = nullptr;
|
||||||
|
|
||||||
void _update_property();
|
void _update_property();
|
||||||
void _open_picker();
|
void _open_picker();
|
||||||
|
@ -135,24 +135,24 @@ public:
|
||||||
class BoneMapper : public VBoxContainer {
|
class BoneMapper : public VBoxContainer {
|
||||||
GDCLASS(BoneMapper, VBoxContainer);
|
GDCLASS(BoneMapper, VBoxContainer);
|
||||||
|
|
||||||
Skeleton3D *skeleton;
|
Skeleton3D *skeleton = nullptr;
|
||||||
Ref<BoneMap> bone_map;
|
Ref<BoneMap> bone_map;
|
||||||
|
|
||||||
EditorPropertyResource *profile_selector;
|
EditorPropertyResource *profile_selector = nullptr;
|
||||||
|
|
||||||
Vector<BoneMapperItem *> bone_mapper_items;
|
Vector<BoneMapperItem *> bone_mapper_items;
|
||||||
|
|
||||||
Button *clear_mapping_button;
|
Button *clear_mapping_button = nullptr;
|
||||||
|
|
||||||
VBoxContainer *mapper_item_vbox;
|
VBoxContainer *mapper_item_vbox = nullptr;
|
||||||
|
|
||||||
int current_group_idx = 0;
|
int current_group_idx = 0;
|
||||||
int current_bone_idx = -1;
|
int current_bone_idx = -1;
|
||||||
|
|
||||||
AspectRatioContainer *bone_mapper_field;
|
AspectRatioContainer *bone_mapper_field = nullptr;
|
||||||
EditorPropertyEnum *profile_group_selector;
|
EditorPropertyEnum *profile_group_selector = nullptr;
|
||||||
ColorRect *profile_bg;
|
ColorRect *profile_bg = nullptr;
|
||||||
TextureRect *profile_texture;
|
TextureRect *profile_texture = nullptr;
|
||||||
Vector<BoneMapperButton *> bone_mapper_buttons;
|
Vector<BoneMapperButton *> bone_mapper_buttons;
|
||||||
|
|
||||||
void create_editor();
|
void create_editor();
|
||||||
|
@ -201,9 +201,9 @@ public:
|
||||||
class BoneMapEditor : public VBoxContainer {
|
class BoneMapEditor : public VBoxContainer {
|
||||||
GDCLASS(BoneMapEditor, VBoxContainer);
|
GDCLASS(BoneMapEditor, VBoxContainer);
|
||||||
|
|
||||||
Skeleton3D *skeleton;
|
Skeleton3D *skeleton = nullptr;
|
||||||
Ref<BoneMap> bone_map;
|
Ref<BoneMap> bone_map;
|
||||||
BoneMapper *bone_mapper;
|
BoneMapper *bone_mapper = nullptr;
|
||||||
|
|
||||||
void fetch_objects();
|
void fetch_objects();
|
||||||
void clear_editors();
|
void clear_editors();
|
||||||
|
@ -219,7 +219,7 @@ public:
|
||||||
|
|
||||||
class EditorInspectorPluginBoneMap : public EditorInspectorPlugin {
|
class EditorInspectorPluginBoneMap : public EditorInspectorPlugin {
|
||||||
GDCLASS(EditorInspectorPluginBoneMap, EditorInspectorPlugin);
|
GDCLASS(EditorInspectorPluginBoneMap, EditorInspectorPlugin);
|
||||||
BoneMapEditor *editor;
|
BoneMapEditor *editor = nullptr;
|
||||||
|
|
||||||
public:
|
public:
|
||||||
virtual bool can_handle(Object *p_object) override;
|
virtual bool can_handle(Object *p_object) override;
|
||||||
|
|
|
@ -42,7 +42,7 @@ class Cast2DEditor : public Control {
|
||||||
|
|
||||||
Ref<EditorUndoRedoManager> undo_redo;
|
Ref<EditorUndoRedoManager> undo_redo;
|
||||||
CanvasItemEditor *canvas_item_editor = nullptr;
|
CanvasItemEditor *canvas_item_editor = nullptr;
|
||||||
Node2D *node;
|
Node2D *node = nullptr;
|
||||||
|
|
||||||
bool pressed = false;
|
bool pressed = false;
|
||||||
Point2 original_target_position;
|
Point2 original_target_position;
|
||||||
|
|
|
@ -186,7 +186,7 @@ public:
|
||||||
class SizeFlagPresetPicker : public ControlEditorPresetPicker {
|
class SizeFlagPresetPicker : public ControlEditorPresetPicker {
|
||||||
GDCLASS(SizeFlagPresetPicker, ControlEditorPresetPicker);
|
GDCLASS(SizeFlagPresetPicker, ControlEditorPresetPicker);
|
||||||
|
|
||||||
CheckBox *expand_button;
|
CheckBox *expand_button = nullptr;
|
||||||
|
|
||||||
bool vertical = false;
|
bool vertical = false;
|
||||||
|
|
||||||
|
|
|
@ -42,7 +42,7 @@ class NavigationLink2DEditor : public Control {
|
||||||
|
|
||||||
Ref<EditorUndoRedoManager> undo_redo;
|
Ref<EditorUndoRedoManager> undo_redo;
|
||||||
CanvasItemEditor *canvas_item_editor = nullptr;
|
CanvasItemEditor *canvas_item_editor = nullptr;
|
||||||
NavigationLink2D *node;
|
NavigationLink2D *node = nullptr;
|
||||||
|
|
||||||
bool start_grabbed = false;
|
bool start_grabbed = false;
|
||||||
Vector2 original_start_location;
|
Vector2 original_start_location;
|
||||||
|
|
Loading…
Add table
Reference in a new issue