diff options
author | Rémi Verschelde <rverschelde@gmail.com> | 2024-02-15 15:44:43 +0100 |
---|---|---|
committer | Rémi Verschelde <rverschelde@gmail.com> | 2024-02-15 15:44:43 +0100 |
commit | ef5d6ccfb7bf155a238ada79db12ea41ca993116 (patch) | |
tree | bc1acc6c5b0df70661293de0f8d0586ce0808982 /core/io/file_access_zip.cpp | |
parent | 4859f8090f1e21d42bc81313f15367dcb1c4220c (diff) | |
parent | a8bc9f3e78788bdf0be7348fcbfac15c127f1f48 (diff) | |
download | redot-engine-ef5d6ccfb7bf155a238ada79db12ea41ca993116.tar.gz |
Merge pull request #86966 from Muller-Castro/value2ref-core
Add const lvalue ref to `core/*` container parameters
Diffstat (limited to 'core/io/file_access_zip.cpp')
-rw-r--r-- | core/io/file_access_zip.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/core/io/file_access_zip.cpp b/core/io/file_access_zip.cpp index dd45332412..3c7f67664d 100644 --- a/core/io/file_access_zip.cpp +++ b/core/io/file_access_zip.cpp @@ -115,7 +115,7 @@ void ZipArchive::close_handle(unzFile p_file) const { unzClose(p_file); } -unzFile ZipArchive::get_file_handle(String p_file) const { +unzFile ZipArchive::get_file_handle(const String &p_file) const { ERR_FAIL_COND_V_MSG(!file_exists(p_file), nullptr, "File '" + p_file + " doesn't exist."); File file = files[p_file]; @@ -206,7 +206,7 @@ bool ZipArchive::try_open_pack(const String &p_path, bool p_replace_files, uint6 return true; } -bool ZipArchive::file_exists(String p_name) const { +bool ZipArchive::file_exists(const String &p_name) const { return files.has(p_name); } |