summaryrefslogtreecommitdiff
path: root/core/io
diff options
context:
space:
mode:
Diffstat (limited to 'core/io')
-rw-r--r--core/io/compression.cpp4
-rw-r--r--core/io/file_access_zip.h2
-rw-r--r--core/io/marshalls.cpp5
3 files changed, 3 insertions, 8 deletions
diff --git a/core/io/compression.cpp b/core/io/compression.cpp
index cd8793bb0a..8e613cb3ce 100644
--- a/core/io/compression.cpp
+++ b/core/io/compression.cpp
@@ -257,13 +257,13 @@ int Compression::decompress_dynamic(Vector<uint8_t> *p_dst_vect, int p_max_dst_s
} while (ret != Z_STREAM_END);
// If all done successfully, resize the output if it's larger than the actual output
- if (ret == Z_STREAM_END && (unsigned long)p_dst_vect->size() > strm.total_out) {
+ if ((unsigned long)p_dst_vect->size() > strm.total_out) {
p_dst_vect->resize(strm.total_out);
}
// clean up and return
(void)inflateEnd(&strm);
- return ret == Z_STREAM_END ? Z_OK : Z_DATA_ERROR;
+ return Z_OK;
}
int Compression::zlib_level = Z_DEFAULT_COMPRESSION;
diff --git a/core/io/file_access_zip.h b/core/io/file_access_zip.h
index eff07c60e2..f8e7c1e587 100644
--- a/core/io/file_access_zip.h
+++ b/core/io/file_access_zip.h
@@ -59,8 +59,6 @@ private:
static ZipArchive *instance;
- FileAccess::CreateFunc fa_create_func;
-
public:
void close_handle(unzFile p_file) const;
unzFile get_file_handle(String p_file) const;
diff --git a/core/io/marshalls.cpp b/core/io/marshalls.cpp
index 3cf4acaf39..db12fcb7f7 100644
--- a/core/io/marshalls.cpp
+++ b/core/io/marshalls.cpp
@@ -1003,10 +1003,7 @@ Error encode_variant(const Variant &p_variant, uint8_t *r_buffer, int &r_len, bo
}
} break;
- case Variant::STRING: {
- _encode_string(p_variant, buf, r_len);
-
- } break;
+ case Variant::STRING:
case Variant::STRING_NAME: {
_encode_string(p_variant, buf, r_len);