diff options
author | Rémi Verschelde <rverschelde@gmail.com> | 2022-05-02 16:28:25 +0200 |
---|---|---|
committer | Rémi Verschelde <rverschelde@gmail.com> | 2022-05-02 16:28:25 +0200 |
commit | c273ddc3eefce78f8eed86dbc71fffd1b0443e2a (patch) | |
tree | c3f86b1b345720b6e0a56db4fbb75a20a0bf82ee /modules | |
parent | dd06cb90c541b39de764ac7bbafd61fb2b9abb48 (diff) |
Style: Partially apply clang-tidy's `cppcoreguidelines-pro-type-member-init`
Didn't commit all the changes where it wants to initialize a struct
with `{}`. Should be reviewed in a separate PR.
Option `IgnoreArrays` enabled for now to be conservative, can be
disabled to see if it proposes more useful changes.
Also fixed manually a handful of other missing initializations / moved
some from constructors.
Diffstat (limited to 'modules')
-rw-r--r-- | modules/cvtt/image_compress_cvtt.cpp | 4 | ||||
-rw-r--r-- | modules/dds/texture_loader_dds.cpp | 2 | ||||
-rw-r--r-- | modules/gdscript/gdscript_utility_functions.cpp | 2 | ||||
-rw-r--r-- | modules/openxr/extensions/openxr_vulkan_extension.h | 10 | ||||
-rw-r--r-- | modules/openxr/openxr_api.h | 4 | ||||
-rw-r--r-- | modules/text_server_adv/text_server_adv.cpp | 4 | ||||
-rw-r--r-- | modules/text_server_fb/text_server_fb.cpp | 4 | ||||
-rw-r--r-- | modules/theora/video_stream_theora.h | 2 | ||||
-rw-r--r-- | modules/visual_script/editor/visual_script_property_selector.h | 4 | ||||
-rw-r--r-- | modules/visual_script/visual_script_builtin_funcs.cpp | 4 | ||||
-rw-r--r-- | modules/visual_script/visual_script_expression.cpp | 4 | ||||
-rw-r--r-- | modules/visual_script/visual_script_flow_control.cpp | 30 | ||||
-rw-r--r-- | modules/visual_script/visual_script_func_nodes.cpp | 26 | ||||
-rw-r--r-- | modules/visual_script/visual_script_nodes.cpp | 72 | ||||
-rw-r--r-- | modules/visual_script/visual_script_yield_nodes.cpp | 8 | ||||
-rw-r--r-- | modules/websocket/wsl_client.h | 2 |
16 files changed, 89 insertions, 93 deletions
diff --git a/modules/cvtt/image_compress_cvtt.cpp b/modules/cvtt/image_compress_cvtt.cpp index d18340a2c8..a7cfcaa262 100644 --- a/modules/cvtt/image_compress_cvtt.cpp +++ b/modules/cvtt/image_compress_cvtt.cpp @@ -46,7 +46,7 @@ struct CVTTCompressionJobParams { }; struct CVTTCompressionRowTask { - const uint8_t *in_mm_bytes; + const uint8_t *in_mm_bytes = nullptr; uint8_t *out_mm_bytes = nullptr; int y_start = 0; int width = 0; @@ -55,7 +55,7 @@ struct CVTTCompressionRowTask { struct CVTTCompressionJobQueue { CVTTCompressionJobParams job_params; - const CVTTCompressionRowTask *job_tasks; + const CVTTCompressionRowTask *job_tasks = nullptr; uint32_t num_tasks = 0; SafeNumeric<uint32_t> current_task; }; diff --git a/modules/dds/texture_loader_dds.cpp b/modules/dds/texture_loader_dds.cpp index 58e5e31f46..ad2d58a0e9 100644 --- a/modules/dds/texture_loader_dds.cpp +++ b/modules/dds/texture_loader_dds.cpp @@ -68,7 +68,7 @@ enum DDSFormat { }; struct DDSFormatInfo { - const char *name; + const char *name = nullptr; bool compressed = false; bool palette = false; uint32_t divisor = 0; diff --git a/modules/gdscript/gdscript_utility_functions.cpp b/modules/gdscript/gdscript_utility_functions.cpp index 89d94d8635..a914374985 100644 --- a/modules/gdscript/gdscript_utility_functions.cpp +++ b/modules/gdscript/gdscript_utility_functions.cpp @@ -545,7 +545,7 @@ struct GDScriptUtilityFunctionsDefinitions { }; struct GDScriptUtilityFunctionInfo { - GDScriptUtilityFunctions::FunctionPtr function; + GDScriptUtilityFunctions::FunctionPtr function = nullptr; MethodInfo info; bool is_constant = false; }; diff --git a/modules/openxr/extensions/openxr_vulkan_extension.h b/modules/openxr/extensions/openxr_vulkan_extension.h index cf55ae264f..1e34fe1f80 100644 --- a/modules/openxr/extensions/openxr_vulkan_extension.h +++ b/modules/openxr/extensions/openxr_vulkan_extension.h @@ -78,11 +78,11 @@ private: bool check_graphics_api_support(XrVersion p_desired_version); - VkInstance vulkan_instance; - VkPhysicalDevice vulkan_physical_device; - VkDevice vulkan_device; - uint32_t vulkan_queue_family_index; - uint32_t vulkan_queue_index; + VkInstance vulkan_instance = nullptr; + VkPhysicalDevice vulkan_physical_device = nullptr; + VkDevice vulkan_device = nullptr; + uint32_t vulkan_queue_family_index = 0; + uint32_t vulkan_queue_index = 0; XrResult xrGetVulkanGraphicsRequirements2KHR(XrInstance p_instance, XrSystemId p_system_id, XrGraphicsRequirementsVulkanKHR *p_graphics_requirements); XrResult xrCreateVulkanInstanceKHR(XrInstance p_instance, const XrVulkanInstanceCreateInfoKHR *p_create_info, VkInstance *r_vulkan_instance, VkResult *r_vulkan_result); diff --git a/modules/openxr/openxr_api.h b/modules/openxr/openxr_api.h index 57475944c0..702f6b9b1d 100644 --- a/modules/openxr/openxr_api.h +++ b/modules/openxr/openxr_api.h @@ -104,9 +104,9 @@ private: // state XrInstance instance = XR_NULL_HANDLE; - XrSystemId system_id; + XrSystemId system_id = 0; String system_name; - uint32_t vendor_id; + uint32_t vendor_id = 0; XrSystemTrackingProperties tracking_properties; XrSession session = XR_NULL_HANDLE; XrSessionState session_state = XR_SESSION_STATE_UNKNOWN; diff --git a/modules/text_server_adv/text_server_adv.cpp b/modules/text_server_adv/text_server_adv.cpp index 437fbe76ab..8e0bedd8f6 100644 --- a/modules/text_server_adv/text_server_adv.cpp +++ b/modules/text_server_adv/text_server_adv.cpp @@ -878,8 +878,8 @@ _FORCE_INLINE_ TextServerAdvanced::FontTexturePosition TextServerAdvanced::find_ struct MSContext { msdfgen::Point2 position; - msdfgen::Shape *shape; - msdfgen::Contour *contour; + msdfgen::Shape *shape = nullptr; + msdfgen::Contour *contour = nullptr; }; class DistancePixelConversion { diff --git a/modules/text_server_fb/text_server_fb.cpp b/modules/text_server_fb/text_server_fb.cpp index d84e9e581a..8ae56aa64d 100644 --- a/modules/text_server_fb/text_server_fb.cpp +++ b/modules/text_server_fb/text_server_fb.cpp @@ -322,8 +322,8 @@ _FORCE_INLINE_ TextServerFallback::FontTexturePosition TextServerFallback::find_ struct MSContext { msdfgen::Point2 position; - msdfgen::Shape *shape; - msdfgen::Contour *contour; + msdfgen::Shape *shape = nullptr; + msdfgen::Contour *contour = nullptr; }; class DistancePixelConversion { diff --git a/modules/theora/video_stream_theora.h b/modules/theora/video_stream_theora.h index 6fa7313fad..8fce85679f 100644 --- a/modules/theora/video_stream_theora.h +++ b/modules/theora/video_stream_theora.h @@ -99,7 +99,7 @@ class VideoStreamPlaybackTheora : public VideoStreamPlayback { Ref<ImageTexture> texture; - AudioMixCallback mix_callback; + AudioMixCallback mix_callback = nullptr; void *mix_udata = nullptr; bool paused = false; diff --git a/modules/visual_script/editor/visual_script_property_selector.h b/modules/visual_script/editor/visual_script_property_selector.h index 1b32ee2967..90a6265ab7 100644 --- a/modules/visual_script/editor/visual_script_property_selector.h +++ b/modules/visual_script/editor/visual_script_property_selector.h @@ -173,8 +173,8 @@ class VisualScriptPropertySelector::SearchRunner : public RefCounted { Control *ui_service = nullptr; Tree *results_tree = nullptr; String term; - int search_flags; - int scope_flags; + int search_flags = 0; + int scope_flags = 0; Ref<Texture2D> empty_icon; Color disabled_color; diff --git a/modules/visual_script/visual_script_builtin_funcs.cpp b/modules/visual_script/visual_script_builtin_funcs.cpp index 7e2df23618..5320f99b7c 100644 --- a/modules/visual_script/visual_script_builtin_funcs.cpp +++ b/modules/visual_script/visual_script_builtin_funcs.cpp @@ -1180,8 +1180,8 @@ void VisualScriptBuiltinFunc::exec_func(BuiltinFunc p_func, const Variant **p_in class VisualScriptNodeInstanceBuiltinFunc : public VisualScriptNodeInstance { public: - VisualScriptBuiltinFunc *node; - VisualScriptInstance *instance; + VisualScriptBuiltinFunc *node = nullptr; + VisualScriptInstance *instance = nullptr; VisualScriptBuiltinFunc::BuiltinFunc func; diff --git a/modules/visual_script/visual_script_expression.cpp b/modules/visual_script/visual_script_expression.cpp index bd36a9ceec..e0f6436094 100644 --- a/modules/visual_script/visual_script_expression.cpp +++ b/modules/visual_script/visual_script_expression.cpp @@ -1299,8 +1299,8 @@ bool VisualScriptExpression::_compile_expression() { class VisualScriptNodeInstanceExpression : public VisualScriptNodeInstance { public: - VisualScriptInstance *instance; - VisualScriptExpression *expression; + VisualScriptInstance *instance = nullptr; + VisualScriptExpression *expression = nullptr; //virtual int get_working_memory_size() const override { return 0; } //execute by parsing the tree directly diff --git a/modules/visual_script/visual_script_flow_control.cpp b/modules/visual_script/visual_script_flow_control.cpp index 7946d96b29..0e63753720 100644 --- a/modules/visual_script/visual_script_flow_control.cpp +++ b/modules/visual_script/visual_script_flow_control.cpp @@ -119,9 +119,9 @@ void VisualScriptReturn::_bind_methods() { class VisualScriptNodeInstanceReturn : public VisualScriptNodeInstance { public: - VisualScriptReturn *node; - VisualScriptInstance *instance; - bool with_value; + VisualScriptReturn *node = nullptr; + VisualScriptInstance *instance = nullptr; + bool with_value = false; virtual int get_working_memory_size() const override { return 1; } //virtual bool is_output_port_unsequenced(int p_idx) const { return false; } @@ -213,8 +213,8 @@ void VisualScriptCondition::_bind_methods() { class VisualScriptNodeInstanceCondition : public VisualScriptNodeInstance { public: - VisualScriptCondition *node; - VisualScriptInstance *instance; + VisualScriptCondition *node = nullptr; + VisualScriptInstance *instance = nullptr; //virtual int get_working_memory_size() const override { return 1; } //virtual bool is_output_port_unsequenced(int p_idx) const { return false; } @@ -293,8 +293,8 @@ void VisualScriptWhile::_bind_methods() { class VisualScriptNodeInstanceWhile : public VisualScriptNodeInstance { public: - VisualScriptWhile *node; - VisualScriptInstance *instance; + VisualScriptWhile *node = nullptr; + VisualScriptInstance *instance = nullptr; //virtual int get_working_memory_size() const override { return 1; } //virtual bool is_output_port_unsequenced(int p_idx) const { return false; } @@ -376,8 +376,8 @@ void VisualScriptIterator::_bind_methods() { class VisualScriptNodeInstanceIterator : public VisualScriptNodeInstance { public: - VisualScriptIterator *node; - VisualScriptInstance *instance; + VisualScriptIterator *node = nullptr; + VisualScriptInstance *instance = nullptr; virtual int get_working_memory_size() const override { return 2; } //virtual bool is_output_port_unsequenced(int p_idx) const { return false; } @@ -508,9 +508,9 @@ void VisualScriptSequence::_bind_methods() { class VisualScriptNodeInstanceSequence : public VisualScriptNodeInstance { public: - VisualScriptSequence *node; - VisualScriptInstance *instance; - int steps; + VisualScriptSequence *node = nullptr; + VisualScriptInstance *instance = nullptr; + int steps = 0; virtual int get_working_memory_size() const override { return 1; } //virtual bool is_output_port_unsequenced(int p_idx) const { return false; } @@ -596,8 +596,8 @@ String VisualScriptSwitch::get_text() const { class VisualScriptNodeInstanceSwitch : public VisualScriptNodeInstance { public: - VisualScriptInstance *instance; - int case_count; + VisualScriptInstance *instance = nullptr; + int case_count = 0; //virtual int get_working_memory_size() const override { return 0; } //virtual bool is_output_port_unsequenced(int p_idx) const { return false; } @@ -774,7 +774,7 @@ VisualScriptTypeCast::TypeGuess VisualScriptTypeCast::guess_output_type(TypeGues class VisualScriptNodeInstanceTypeCast : public VisualScriptNodeInstance { public: - VisualScriptInstance *instance; + VisualScriptInstance *instance = nullptr; StringName base_type; String script; diff --git a/modules/visual_script/visual_script_func_nodes.cpp b/modules/visual_script/visual_script_func_nodes.cpp index 5cc9236a9a..483fc8b6c3 100644 --- a/modules/visual_script/visual_script_func_nodes.cpp +++ b/modules/visual_script/visual_script_func_nodes.cpp @@ -720,15 +720,15 @@ class VisualScriptNodeInstanceFunctionCall : public VisualScriptNodeInstance { public: VisualScriptFunctionCall::CallMode call_mode; NodePath node_path; - int input_args; - bool validate; - int returns; + int input_args = 0; + bool validate = false; + int returns = 0; VisualScriptFunctionCall::RPCCallMode rpc_mode; StringName function; StringName singleton; - VisualScriptFunctionCall *node; - VisualScriptInstance *instance; + VisualScriptFunctionCall *node = nullptr; + VisualScriptInstance *instance = nullptr; //virtual int get_working_memory_size() const override { return 0; } //virtual bool is_output_port_unsequenced(int p_idx) const { return false; } @@ -1462,11 +1462,11 @@ public: NodePath node_path; StringName property; - VisualScriptPropertySet *node; - VisualScriptInstance *instance; + VisualScriptPropertySet *node = nullptr; + VisualScriptInstance *instance = nullptr; VisualScriptPropertySet::AssignOp assign_op; StringName index; - bool needs_get; + bool needs_get = false; //virtual int get_working_memory_size() const override { return 0; } //virtual bool is_output_port_unsequenced(int p_idx) const { return false; } @@ -2152,8 +2152,8 @@ public: StringName property; StringName index; - VisualScriptPropertyGet *node; - VisualScriptInstance *instance; + VisualScriptPropertyGet *node = nullptr; + VisualScriptInstance *instance = nullptr; virtual int step(const Variant **p_inputs, Variant **p_outputs, StartMode p_start_mode, Variant *p_working_mem, Callable::CallError &r_error, String &r_error_str) override { switch (call_mode) { @@ -2362,9 +2362,9 @@ void VisualScriptEmitSignal::_bind_methods() { class VisualScriptNodeInstanceEmitSignal : public VisualScriptNodeInstance { public: - VisualScriptEmitSignal *node; - VisualScriptInstance *instance; - int argcount; + VisualScriptEmitSignal *node = nullptr; + VisualScriptInstance *instance = nullptr; + int argcount = 0; StringName name; //virtual int get_working_memory_size() const override { return 0; } diff --git a/modules/visual_script/visual_script_nodes.cpp b/modules/visual_script/visual_script_nodes.cpp index 6e10b72013..dbbe74f3d5 100644 --- a/modules/visual_script/visual_script_nodes.cpp +++ b/modules/visual_script/visual_script_nodes.cpp @@ -271,8 +271,8 @@ Multiplayer::RPCMode VisualScriptFunction::get_rpc_mode() const { class VisualScriptNodeInstanceFunction : public VisualScriptNodeInstance { public: - VisualScriptFunction *node; - VisualScriptInstance *instance; + VisualScriptFunction *node = nullptr; + VisualScriptInstance *instance = nullptr; //virtual int get_working_memory_size() const override { return 0; } @@ -1097,7 +1097,7 @@ void VisualScriptOperator::_bind_methods() { class VisualScriptNodeInstanceOperator : public VisualScriptNodeInstance { public: - bool unary; + bool unary = false; Variant::Operator op; //virtual int get_working_memory_size() const override { return 0; } @@ -1328,8 +1328,8 @@ void VisualScriptVariableGet::_bind_methods() { class VisualScriptNodeInstanceVariableGet : public VisualScriptNodeInstance { public: - VisualScriptVariableGet *node; - VisualScriptInstance *instance; + VisualScriptVariableGet *node = nullptr; + VisualScriptInstance *instance = nullptr; StringName variable; virtual int step(const Variant **p_inputs, Variant **p_outputs, StartMode p_start_mode, Variant *p_working_mem, Callable::CallError &r_error, String &r_error_str) override { @@ -1438,8 +1438,8 @@ void VisualScriptVariableSet::_bind_methods() { class VisualScriptNodeInstanceVariableSet : public VisualScriptNodeInstance { public: - VisualScriptVariableSet *node; - VisualScriptInstance *instance; + VisualScriptVariableSet *node = nullptr; + VisualScriptInstance *instance = nullptr; StringName variable; //virtual int get_working_memory_size() const override { return 0; } @@ -1851,8 +1851,7 @@ int VisualScriptGlobalConstant::get_global_constant() { class VisualScriptNodeInstanceGlobalConstant : public VisualScriptNodeInstance { public: - int index; - //virtual int get_working_memory_size() const override { return 0; } + int index = 0; virtual int step(const Variant **p_inputs, Variant **p_outputs, StartMode p_start_mode, Variant *p_working_mem, Callable::CallError &r_error, String &r_error_str) override { *p_outputs[0] = CoreConstants::get_global_constant_value(index); @@ -1963,9 +1962,8 @@ StringName VisualScriptClassConstant::get_base_type() { class VisualScriptNodeInstanceClassConstant : public VisualScriptNodeInstance { public: - int value; - bool valid; - //virtual int get_working_memory_size() const override { return 0; } + int value = 0; + bool valid = false; virtual int step(const Variant **p_inputs, Variant **p_outputs, StartMode p_start_mode, Variant *p_working_mem, Callable::CallError &r_error, String &r_error_str) override { if (!valid) { @@ -2098,8 +2096,7 @@ Variant::Type VisualScriptBasicTypeConstant::get_basic_type() const { class VisualScriptNodeInstanceBasicTypeConstant : public VisualScriptNodeInstance { public: Variant value; - bool valid; - //virtual int get_working_memory_size() const override { return 0; } + bool valid = false; virtual int step(const Variant **p_inputs, Variant **p_outputs, StartMode p_start_mode, Variant *p_working_mem, Callable::CallError &r_error, String &r_error_str) override { if (!valid) { @@ -2227,8 +2224,7 @@ VisualScriptMathConstant::MathConstant VisualScriptMathConstant::get_math_consta class VisualScriptNodeInstanceMathConstant : public VisualScriptNodeInstance { public: - float value; - //virtual int get_working_memory_size() const override { return 0; } + float value = 0.0f; virtual int step(const Variant **p_inputs, Variant **p_outputs, StartMode p_start_mode, Variant *p_working_mem, Callable::CallError &r_error, String &r_error_str) override { *p_outputs[0] = value; @@ -2320,7 +2316,7 @@ String VisualScriptEngineSingleton::get_singleton() { class VisualScriptNodeInstanceEngineSingleton : public VisualScriptNodeInstance { public: - Object *singleton; + Object *singleton = nullptr; //virtual int get_working_memory_size() const override { return 0; } @@ -2429,8 +2425,8 @@ NodePath VisualScriptSceneNode::get_node_path() { class VisualScriptNodeInstanceSceneNode : public VisualScriptNodeInstance { public: - VisualScriptSceneNode *node; - VisualScriptInstance *instance; + VisualScriptSceneNode *node = nullptr; + VisualScriptInstance *instance = nullptr; NodePath path; //virtual int get_working_memory_size() const override { return 0; } @@ -2610,8 +2606,8 @@ String VisualScriptSceneTree::get_caption() const { class VisualScriptNodeInstanceSceneTree : public VisualScriptNodeInstance { public: - VisualScriptSceneTree *node; - VisualScriptInstance *instance; + VisualScriptSceneTree *node = nullptr; + VisualScriptInstance *instance = nullptr; //virtual int get_working_memory_size() const override { return 0; } @@ -2779,7 +2775,7 @@ String VisualScriptSelf::get_caption() const { class VisualScriptNodeInstanceSelf : public VisualScriptNodeInstance { public: - VisualScriptInstance *instance; + VisualScriptInstance *instance = nullptr; //virtual int get_working_memory_size() const override { return 0; } @@ -2965,11 +2961,11 @@ String VisualScriptCustomNode::get_category() const { class VisualScriptNodeInstanceCustomNode : public VisualScriptNodeInstance { public: - VisualScriptInstance *instance; - VisualScriptCustomNode *node; - int in_count; - int out_count; - int work_mem_size; + VisualScriptInstance *instance = nullptr; + VisualScriptCustomNode *node = nullptr; + int in_count = 0; + int out_count = 0; + int work_mem_size = 0; virtual int get_working_memory_size() const override { return work_mem_size; } virtual int step(const Variant **p_inputs, Variant **p_outputs, StartMode p_start_mode, Variant *p_working_mem, Callable::CallError &r_error, String &r_error_str) override { @@ -3161,10 +3157,10 @@ String VisualScriptSubCall::get_category() const { class VisualScriptNodeInstanceSubCall : public VisualScriptNodeInstance { public: - VisualScriptInstance *instance; - VisualScriptSubCall *subcall; - int input_args; - bool valid; + VisualScriptInstance *instance = nullptr; + VisualScriptSubCall *subcall = nullptr; + int input_args = 0; + bool valid = false; //virtual int get_working_memory_size() const override { return 0; } @@ -3281,7 +3277,7 @@ String VisualScriptComment::get_category() const { class VisualScriptNodeInstanceComment : public VisualScriptNodeInstance { public: - VisualScriptInstance *instance; + VisualScriptInstance *instance = nullptr; //virtual int get_working_memory_size() const override { return 0; } @@ -3380,9 +3376,9 @@ Dictionary VisualScriptConstructor::get_constructor() const { class VisualScriptNodeInstanceConstructor : public VisualScriptNodeInstance { public: - VisualScriptInstance *instance; + VisualScriptInstance *instance = nullptr; Variant::Type type; - int argcount; + int argcount = 0; //virtual int get_working_memory_size() const override { return 0; } @@ -3497,7 +3493,7 @@ Variant::Type VisualScriptLocalVar::get_var_type() const { class VisualScriptNodeInstanceLocalVar : public VisualScriptNodeInstance { public: - VisualScriptInstance *instance; + VisualScriptInstance *instance = nullptr; StringName name; virtual int get_working_memory_size() const override { return 1; } @@ -3604,7 +3600,7 @@ Variant::Type VisualScriptLocalVarSet::get_var_type() const { class VisualScriptNodeInstanceLocalVarSet : public VisualScriptNodeInstance { public: - VisualScriptInstance *instance; + VisualScriptInstance *instance = nullptr; StringName name; virtual int get_working_memory_size() const override { return 1; } @@ -3728,7 +3724,7 @@ VisualScriptInputAction::Mode VisualScriptInputAction::get_action_mode() const { class VisualScriptNodeInstanceInputAction : public VisualScriptNodeInstance { public: - VisualScriptInstance *instance; + VisualScriptInstance *instance = nullptr; StringName action; VisualScriptInputAction::Mode mode; @@ -3906,7 +3902,7 @@ Array VisualScriptDeconstruct::_get_elem_cache() const { class VisualScriptNodeInstanceDeconstruct : public VisualScriptNodeInstance { public: - VisualScriptInstance *instance; + VisualScriptInstance *instance = nullptr; Vector<StringName> outputs; //virtual int get_working_memory_size() const override { return 0; } diff --git a/modules/visual_script/visual_script_yield_nodes.cpp b/modules/visual_script/visual_script_yield_nodes.cpp index e6e7f79d1f..96e91a0baf 100644 --- a/modules/visual_script/visual_script_yield_nodes.cpp +++ b/modules/visual_script/visual_script_yield_nodes.cpp @@ -93,7 +93,7 @@ String VisualScriptYield::get_text() const { class VisualScriptNodeInstanceYield : public VisualScriptNodeInstance { public: VisualScriptYield::YieldMode mode; - double wait_time; + double wait_time = 0.0; virtual int get_working_memory_size() const override { return 1; } //yield needs at least 1 //virtual bool is_output_port_unsequenced(int p_idx) const { return false; } @@ -500,11 +500,11 @@ class VisualScriptNodeInstanceYieldSignal : public VisualScriptNodeInstance { public: VisualScriptYieldSignal::CallMode call_mode; NodePath node_path; - int output_args; + int output_args = 0; StringName signal; - VisualScriptYieldSignal *node; - VisualScriptInstance *instance; + VisualScriptYieldSignal *node = nullptr; + VisualScriptInstance *instance = nullptr; virtual int get_working_memory_size() const override { return 1; } //virtual bool is_output_port_unsequenced(int p_idx) const { return false; } diff --git a/modules/websocket/wsl_client.h b/modules/websocket/wsl_client.h index 22b3a4f373..04af83f28c 100644 --- a/modules/websocket/wsl_client.h +++ b/modules/websocket/wsl_client.h @@ -63,7 +63,7 @@ private: String _key; String _host; - uint16_t _port; + uint16_t _port = 0; Array _ip_candidates; Vector<String> _protocols; bool _use_ssl = false; |