diff options
author | Yuri Kunde Schlesner <yuriks@yuriks.net> | 2015-07-14 01:43:34 +0200 |
---|---|---|
committer | Yuri Kunde Schlesner <yuriks@yuriks.net> | 2015-07-14 02:10:12 +0200 |
commit | a1f08788d9626434c6f743b1cf2a9a4e59dbc741 (patch) | |
tree | 275321ce3675c38581e51a431cea63f67b7912cc /src/core/file_sys/ivfc_archive.cpp | |
parent | Loader: Remove unnecessary pointer indirection to IOFile (diff) | |
download | yuzu-a1f08788d9626434c6f743b1cf2a9a4e59dbc741.tar yuzu-a1f08788d9626434c6f743b1cf2a9a4e59dbc741.tar.gz yuzu-a1f08788d9626434c6f743b1cf2a9a4e59dbc741.tar.bz2 yuzu-a1f08788d9626434c6f743b1cf2a9a4e59dbc741.tar.lz yuzu-a1f08788d9626434c6f743b1cf2a9a4e59dbc741.tar.xz yuzu-a1f08788d9626434c6f743b1cf2a9a4e59dbc741.tar.zst yuzu-a1f08788d9626434c6f743b1cf2a9a4e59dbc741.zip |
Diffstat (limited to '')
-rw-r--r-- | src/core/file_sys/ivfc_archive.cpp | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/src/core/file_sys/ivfc_archive.cpp b/src/core/file_sys/ivfc_archive.cpp index 2b88b1d5d..e16aa1491 100644 --- a/src/core/file_sys/ivfc_archive.cpp +++ b/src/core/file_sys/ivfc_archive.cpp @@ -61,21 +61,21 @@ std::unique_ptr<DirectoryBackend> IVFCArchive::OpenDirectory(const Path& path) c //////////////////////////////////////////////////////////////////////////////////////////////////// -size_t IVFCFile::Read(const u64 offset, const u32 length, u8* buffer) const { +size_t IVFCFile::Read(const u64 offset, const size_t length, u8* buffer) const { LOG_TRACE(Service_FS, "called offset=%llu, length=%d", offset, length); romfs_file->Seek(data_offset + offset, SEEK_SET); - u32 read_length = (u32)std::min((u64)length, data_size - offset); + size_t read_length = (size_t)std::min((u64)length, data_size - offset); return romfs_file->ReadBytes(buffer, read_length); } -size_t IVFCFile::Write(const u64 offset, const u32 length, const u32 flush, const u8* buffer) const { +size_t IVFCFile::Write(const u64 offset, const size_t length, const bool flush, const u8* buffer) const { LOG_ERROR(Service_FS, "Attempted to write to IVFC file"); return 0; } -size_t IVFCFile::GetSize() const { - return data_size; // TODO: return value will overflow on 32-bit machines +u64 IVFCFile::GetSize() const { + return data_size; } bool IVFCFile::SetSize(const u64 size) const { |