diff options
author | Florian Kothmeier <floriankothmeier@web.de> | 2023-09-10 00:22:53 +0200 |
---|---|---|
committer | Florian Kothmeier <floriankothmeier@web.de> | 2023-09-10 00:22:53 +0200 |
commit | a41ae7d69c1f51880a5f41ee6e351fa8e0f83d73 (patch) | |
tree | 58ab940bc3d9d23e3c7f9b236d999d08cb70b7a4 /modules/zip/zip_packer.cpp | |
parent | fc99492d3066098e938449b10e02f8e01d07e2d1 (diff) | |
download | redot-engine-a41ae7d69c1f51880a5f41ee6e351fa8e0f83d73.tar.gz |
Use pass by reference in ZIPPacker & ZIPReader signatures
Diffstat (limited to 'modules/zip/zip_packer.cpp')
-rw-r--r-- | modules/zip/zip_packer.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/modules/zip/zip_packer.cpp b/modules/zip/zip_packer.cpp index c8b4fb4e77..5f623476fc 100644 --- a/modules/zip/zip_packer.cpp +++ b/modules/zip/zip_packer.cpp @@ -33,7 +33,7 @@ #include "core/io/zip_io.h" #include "core/os/os.h" -Error ZIPPacker::open(String p_path, ZipAppend p_append) { +Error ZIPPacker::open(const String &p_path, ZipAppend p_append) { if (fa.is_valid()) { close(); } @@ -55,7 +55,7 @@ Error ZIPPacker::close() { return err; } -Error ZIPPacker::start_file(String p_path) { +Error ZIPPacker::start_file(const String &p_path) { ERR_FAIL_COND_V_MSG(fa.is_null(), FAILED, "ZIPPacker must be opened before use."); zip_fileinfo zipfi; @@ -76,7 +76,7 @@ Error ZIPPacker::start_file(String p_path) { return err == ZIP_OK ? OK : FAILED; } -Error ZIPPacker::write_file(Vector<uint8_t> p_data) { +Error ZIPPacker::write_file(const Vector<uint8_t> &p_data) { ERR_FAIL_COND_V_MSG(fa.is_null(), FAILED, "ZIPPacker must be opened before use."); return zipWriteInFileInZip(zf, p_data.ptr(), p_data.size()) == ZIP_OK ? OK : FAILED; |