Archive: Correct a few incorrect types in function signatures

Buffer lengths should be size_t, and file offsets should be u64.
This commit is contained in:
Yuri Kunde Schlesner
2015-07-13 20:43:34 -03:00
parent 2d7299a86f
commit a1f08788d9
6 changed files with 22 additions and 22 deletions

View File

@ -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 {