diff options
author | Rémi Verschelde <remi@verschelde.fr> | 2021-02-08 11:53:02 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-02-08 11:53:02 +0100 |
commit | 332a33503bf6ddd25f4012a0b8caaaeb67e9b18e (patch) | |
tree | 0eb10c2fcb4e7f94a2ca16365e9d36076b94bc03 /modules/gdscript/gdscript_function.cpp | |
parent | 5260b6e046c244ed6376c47c7af5a0f27d934c12 (diff) | |
parent | f7209b459b4faaae9d93bfb6ac5346eb41787f92 (diff) | |
download | redot-engine-332a33503bf6ddd25f4012a0b8caaaeb67e9b18e.tar.gz |
Merge pull request #43952 from qarmin/cppcheck_modules
Initialize class/struct variables with default values in modules/
Diffstat (limited to 'modules/gdscript/gdscript_function.cpp')
-rw-r--r-- | modules/gdscript/gdscript_function.cpp | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/modules/gdscript/gdscript_function.cpp b/modules/gdscript/gdscript_function.cpp index 2171426e6f..c6c9a439df 100644 --- a/modules/gdscript/gdscript_function.cpp +++ b/modules/gdscript/gdscript_function.cpp @@ -77,14 +77,14 @@ int GDScriptFunction::get_max_stack_size() const { } struct _GDFKC { - int order; + int order = 0; List<int> pos; }; struct _GDFKCS { - int order; + int order = 0; StringName id; - int pos; + int pos = 0; bool operator<(const _GDFKCS &p_r) const { return order < p_r.order; @@ -294,7 +294,6 @@ void GDScriptFunctionState::_bind_methods() { GDScriptFunctionState::GDScriptFunctionState() : scripts_list(this), instances_list(this) { - function = nullptr; } GDScriptFunctionState::~GDScriptFunctionState() { |