diff options
author | qarmin <mikrutrafal54@gmail.com> | 2019-06-20 16:59:48 +0200 |
---|---|---|
committer | qarmin <mikrutrafal54@gmail.com> | 2019-06-20 16:59:48 +0200 |
commit | 072e40368e19e0f88ec1fbb61fe463a6fffcca36 (patch) | |
tree | 2a5c9383550dc22392bb210d5be570e1baa33fe2 /core/io/resource_format_binary.cpp | |
parent | 7a8dcb9a114d742f9bc1e269d738903c00729b8b (diff) | |
download | redot-engine-072e40368e19e0f88ec1fbb61fe463a6fffcca36.tar.gz |
Fix always true/false values
Diffstat (limited to 'core/io/resource_format_binary.cpp')
-rw-r--r-- | core/io/resource_format_binary.cpp | 10 |
1 files changed, 3 insertions, 7 deletions
diff --git a/core/io/resource_format_binary.cpp b/core/io/resource_format_binary.cpp index f25abc4aab..aef2dcfff3 100644 --- a/core/io/resource_format_binary.cpp +++ b/core/io/resource_format_binary.cpp @@ -991,10 +991,7 @@ Ref<ResourceInteractiveLoader> ResourceFormatLoaderBinary::load_interactive(cons Error err; FileAccess *f = FileAccess::open(p_path, FileAccess::READ, &err); - if (err != OK) { - - ERR_FAIL_COND_V(err != OK, Ref<ResourceInteractiveLoader>()); - } + ERR_FAIL_COND_V(err != OK, Ref<ResourceInteractiveLoader>()); Ref<ResourceInteractiveLoaderBinary> ria = memnew(ResourceInteractiveLoaderBinary); String path = p_original_path != "" ? p_original_path : p_path; @@ -1129,9 +1126,8 @@ Error ResourceFormatLoaderBinary::rename_dependencies(const String &p_path, cons Error err; f = FileAccess::open(p_path, FileAccess::READ, &err); - if (err != OK) { - ERR_FAIL_COND_V(err != OK, ERR_FILE_CANT_OPEN); - } + + ERR_FAIL_COND_V(err != OK, ERR_FILE_CANT_OPEN); Ref<ResourceInteractiveLoaderBinary> ria = memnew(ResourceInteractiveLoaderBinary); ria->local_path = ProjectSettings::get_singleton()->localize_path(p_path); |