summaryrefslogtreecommitdiffstats
path: root/core/io/resource_format_binary.cpp
diff options
context:
space:
mode:
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);