diff options
author | RĂ©mi Verschelde <rverschelde@gmail.com> | 2020-03-04 13:41:38 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-03-04 13:41:38 +0100 |
commit | a0e33e17fbecc321d45306255814f9581504776c (patch) | |
tree | 966803124d47a23266ae3f81e57c7cf8f0456521 /scene | |
parent | f83f1d7c9b299f21f818e0ea28c27345f65bde4b (diff) | |
parent | 1f209bfc41ef5f2cd63c961262d5d6fe3e03b55a (diff) |
Merge pull request #36733 from qarmin/static_analyzer_fixes
Fixes bugs found by Sonarcloud and Coverity
Diffstat (limited to 'scene')
-rw-r--r-- | scene/resources/resource_format_text.cpp | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/scene/resources/resource_format_text.cpp b/scene/resources/resource_format_text.cpp index 97bd12c119..238bdf05ef 100644 --- a/scene/resources/resource_format_text.cpp +++ b/scene/resources/resource_format_text.cpp @@ -403,8 +403,6 @@ Ref<PackedScene> ResourceLoaderText::_parse_node_tag(VariantParser::ResourcePars return Ref<PackedScene>(); } } - - return packed_scene; } Error ResourceLoaderText::load() { @@ -671,10 +669,6 @@ Error ResourceLoaderText::load() { return error; } } - - if (progress) { - *progress = resource_current / float(resources_total); - } } //for scene files @@ -731,9 +725,15 @@ void ResourceLoaderText::set_translation_remapped(bool p_remapped) { } ResourceLoaderText::ResourceLoaderText() { + resources_total = 0; + resource_current = 0; + use_sub_threads = false; + progress = nullptr; + lines = false; translation_remapped = false; use_sub_threads = false; + error = OK; } ResourceLoaderText::~ResourceLoaderText() { |