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 /servers/rendering/shader_language.h | |
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 'servers/rendering/shader_language.h')
-rw-r--r-- | servers/rendering/shader_language.h | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/servers/rendering/shader_language.h b/servers/rendering/shader_language.h index de6d912a4f..c707d09f29 100644 --- a/servers/rendering/shader_language.h +++ b/servers/rendering/shader_language.h @@ -874,11 +874,11 @@ private: static const KeyWord keyword_list[]; - GlobalVariableGetTypeFunc global_var_get_type_func; + GlobalVariableGetTypeFunc global_var_get_type_func = nullptr; - bool error_set; + bool error_set = false; String error_str; - int error_line; + int error_line = 0; #ifdef DEBUG_ENABLED struct Usage { @@ -902,7 +902,7 @@ private: List<ShaderWarning> warnings; bool check_warnings = false; - uint32_t warning_flags; + uint32_t warning_flags = 0; void _add_line_warning(ShaderWarning::Code p_code, const StringName &p_subject = "", const Vector<Variant> &p_extra_args = Vector<Variant>()) { warnings.push_back(ShaderWarning(p_code, tk_line, p_subject, p_extra_args)); @@ -917,8 +917,8 @@ private: #endif // DEBUG_ENABLED String code; - int char_idx; - int tk_line; + int char_idx = 0; + int tk_line = 0; StringName current_function; bool last_const = false; @@ -1020,14 +1020,14 @@ private: }; CompletionType completion_type; - int completion_line; + int completion_line = 0; BlockNode *completion_block = nullptr; DataType completion_base; - bool completion_base_array; + bool completion_base_array = false; SubClassTag completion_class; StringName completion_function; StringName completion_struct; - int completion_argument; + int completion_argument = 0; const Map<StringName, FunctionInfo> *stages = nullptr; |