summaryrefslogtreecommitdiffstats
path: root/core/io/resource_format_binary.cpp
diff options
context:
space:
mode:
authorRémi Verschelde <rverschelde@gmail.com>2019-06-20 21:10:10 +0200
committerGitHub <noreply@github.com>2019-06-20 21:10:10 +0200
commit5c66771e3ebccdfec55bb94ea521d2f24cb6200a (patch)
tree80bea3ee8792cb19e719221987faf1a2bf1e88a3 /core/io/resource_format_binary.cpp
parent7b88ac08437d3bd062efcbdd40c215b533032412 (diff)
parent072e40368e19e0f88ec1fbb61fe463a6fffcca36 (diff)
downloadredot-engine-5c66771e3ebccdfec55bb94ea521d2f24cb6200a.tar.gz
Merge pull request #29283 from qarmin/fix_some_always_same_values
Remove always true/false values
Diffstat (limited to 'core/io/resource_format_binary.cpp')
-rw-r--r--core/io/resource_format_binary.cpp10
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);