summaryrefslogtreecommitdiff
path: root/core/variant/variant_utility.cpp
diff options
context:
space:
mode:
authorRémi Verschelde <rverschelde@gmail.com>2022-05-02 16:28:25 +0200
committerRémi Verschelde <rverschelde@gmail.com>2022-05-02 16:28:25 +0200
commitc273ddc3eefce78f8eed86dbc71fffd1b0443e2a (patch)
treec3f86b1b345720b6e0a56db4fbb75a20a0bf82ee /core/variant/variant_utility.cpp
parentdd06cb90c541b39de764ac7bbafd61fb2b9abb48 (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 'core/variant/variant_utility.cpp')
-rw-r--r--core/variant/variant_utility.cpp14
1 files changed, 7 insertions, 7 deletions
diff --git a/core/variant/variant_utility.cpp b/core/variant/variant_utility.cpp
index 6ed85815be..7c821ad41d 100644
--- a/core/variant/variant_utility.cpp
+++ b/core/variant/variant_utility.cpp
@@ -1110,14 +1110,14 @@ static _FORCE_INLINE_ Variant::Type get_ret_type_helper(void (*p_func)(P...)) {
register_utility_function<Func_##m_func>(#m_func, m_args)
struct VariantUtilityFunctionInfo {
- void (*call_utility)(Variant *r_ret, const Variant **p_args, int p_argcount, Callable::CallError &r_error);
- Variant::ValidatedUtilityFunction validated_call_utility;
- Variant::PTRUtilityFunction ptr_call_utility;
+ void (*call_utility)(Variant *r_ret, const Variant **p_args, int p_argcount, Callable::CallError &r_error) = nullptr;
+ Variant::ValidatedUtilityFunction validated_call_utility = nullptr;
+ Variant::PTRUtilityFunction ptr_call_utility = nullptr;
Vector<String> argnames;
- bool is_vararg;
- bool returns_value;
- int argcount;
- Variant::Type (*get_arg_type)(int);
+ bool is_vararg = false;
+ bool returns_value = false;
+ int argcount = 0;
+ Variant::Type (*get_arg_type)(int) = nullptr;
Variant::Type return_type;
Variant::UtilityFunctionType type;
};