diff options
author | RĂ©mi Verschelde <rverschelde@gmail.com> | 2019-06-20 21:10:10 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2019-06-20 21:10:10 +0200 |
commit | 5c66771e3ebccdfec55bb94ea521d2f24cb6200a (patch) | |
tree | 80bea3ee8792cb19e719221987faf1a2bf1e88a3 /core/os | |
parent | 7b88ac08437d3bd062efcbdd40c215b533032412 (diff) | |
parent | 072e40368e19e0f88ec1fbb61fe463a6fffcca36 (diff) |
Merge pull request #29283 from qarmin/fix_some_always_same_values
Remove always true/false values
Diffstat (limited to 'core/os')
-rw-r--r-- | core/os/file_access.cpp | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/core/os/file_access.cpp b/core/os/file_access.cpp index 079f51bada..913caf6584 100644 --- a/core/os/file_access.cpp +++ b/core/os/file_access.cpp @@ -600,9 +600,8 @@ Vector<uint8_t> FileAccess::get_file_as_array(const String &p_path, Error *r_err if (!f) { if (r_error) { // if error requested, do not throw error return Vector<uint8_t>(); - } else { - ERR_FAIL_COND_V(!f, Vector<uint8_t>()); } + ERR_FAIL_COND_V(!f, Vector<uint8_t>()); } Vector<uint8_t> data; data.resize(f->get_len()); @@ -621,9 +620,8 @@ String FileAccess::get_file_as_string(const String &p_path, Error *r_error) { if (err != OK) { if (r_error) { return String(); - } else { - ERR_FAIL_COND_V(err != OK, String()); } + ERR_FAIL_COND_V(err != OK, String()); } String ret; |