Merge pull request #57467 from webbuf/modules-initialize

Initialized Member Variables in /modules
This commit is contained in:
Rémi Verschelde 2022-02-03 20:41:29 +01:00 committed by GitHub
commit c47f059776
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
6 changed files with 19 additions and 23 deletions

View File

@ -105,7 +105,7 @@ private:
}; };
class SphereShapeBullet : public ShapeBullet { class SphereShapeBullet : public ShapeBullet {
real_t radius; real_t radius = 0.0;
public: public:
SphereShapeBullet(); SphereShapeBullet();
@ -137,8 +137,8 @@ private:
}; };
class CapsuleShapeBullet : public ShapeBullet { class CapsuleShapeBullet : public ShapeBullet {
real_t height; real_t height = 0.0;
real_t radius; real_t radius = 0.0;
public: public:
CapsuleShapeBullet(); CapsuleShapeBullet();
@ -155,8 +155,8 @@ private:
}; };
class CylinderShapeBullet : public ShapeBullet { class CylinderShapeBullet : public ShapeBullet {
real_t height; real_t height = 0.0;
real_t radius; real_t radius = 0.0;
public: public:
CylinderShapeBullet(); CylinderShapeBullet();

View File

@ -103,8 +103,6 @@ private:
bool valid = false; bool valid = false;
bool reload_invalidated = false; bool reload_invalidated = false;
bool builtin;
GDMonoClass *base = nullptr; GDMonoClass *base = nullptr;
GDMonoClass *native = nullptr; GDMonoClass *native = nullptr;
GDMonoClass *script_class = nullptr; GDMonoClass *script_class = nullptr;

View File

@ -104,7 +104,7 @@ class OGGPacketSequencePlayback : public RefCounted {
mutable ogg_packet *packet; mutable ogg_packet *packet;
uint64_t data_version; uint64_t data_version = 0;
mutable int64_t packetno = 0; mutable int64_t packetno = 0;

View File

@ -173,10 +173,10 @@ class VisualScriptEditor : public ScriptEditorBase {
String member_name; String member_name;
PortAction port_action; PortAction port_action;
int port_action_node; int port_action_node = 0;
int port_action_output; int port_action_output = 0;
Vector2 port_action_pos; Vector2 port_action_pos;
int port_action_new_node; int port_action_new_node = 0;
bool saved_pos_dirty = false; bool saved_pos_dirty = false;
@ -196,7 +196,7 @@ class VisualScriptEditor : public ScriptEditorBase {
int _create_new_node_from_name(const String &p_text, const Vector2 &p_point); int _create_new_node_from_name(const String &p_text, const Vector2 &p_point);
void _selected_new_virtual_method(const String &p_text, const String &p_category, const bool p_connecting); void _selected_new_virtual_method(const String &p_text, const String &p_category, const bool p_connecting);
int error_line; int error_line = -1;
void _node_selected(Node *p_node); void _node_selected(Node *p_node);
void _center_on_node(int p_id); void _center_on_node(int p_id);
@ -267,12 +267,12 @@ class VisualScriptEditor : public ScriptEditorBase {
bool can_drop_data_fw(const Point2 &p_point, const Variant &p_data, Control *p_from) const; bool can_drop_data_fw(const Point2 &p_point, const Variant &p_data, Control *p_from) const;
void drop_data_fw(const Point2 &p_point, const Variant &p_data, Control *p_from); void drop_data_fw(const Point2 &p_point, const Variant &p_data, Control *p_from);
int editing_id; int editing_id = 0;
int editing_input; int editing_input = 0;
bool can_swap; bool can_swap = false;
int data_disconnect_node; int data_disconnect_node = 0;
int data_disconnect_port; int data_disconnect_port = 0;
void _default_value_changed(); void _default_value_changed();
void _default_value_edited(Node *p_button, int p_id, int p_input_port); void _default_value_edited(Node *p_button, int p_id, int p_input_port);

View File

@ -379,8 +379,6 @@ void VisualScriptPropertySelector::_bind_methods() {
} }
VisualScriptPropertySelector::VisualScriptPropertySelector() { VisualScriptPropertySelector::VisualScriptPropertySelector() {
virtuals_only = false;
vbox = memnew(VBoxContainer); vbox = memnew(VBoxContainer);
add_child(vbox); add_child(vbox);

View File

@ -96,16 +96,16 @@ class VisualScriptPropertySelector : public ConfirmationDialog {
EditorHelpBit *help_bit; EditorHelpBit *help_bit;
bool properties; bool properties = false;
bool visual_script_generic; bool visual_script_generic = false;
bool connecting; bool connecting = false;
String selected; String selected;
Variant::Type type; Variant::Type type;
String base_type; String base_type;
String base_script; String base_script;
ObjectID script; ObjectID script;
Object *instance; Object *instance;
bool virtuals_only; bool virtuals_only = false;
VBoxContainer *vbox; VBoxContainer *vbox;
protected: protected: