Module: Cleanup file read pattern.
Let's always use ReadEntireFile() when we can.
This commit is contained in:
parent
199bfe4596
commit
d473aa6db0
3 changed files with 17 additions and 42 deletions
|
@ -593,7 +593,7 @@ int MetaFileSystem::ReadEntireFile(const std::string &filename, std::vector<u8>
|
|||
SeekFile(handle, 0, FILEMOVE_BEGIN);
|
||||
data.resize(dataSize);
|
||||
|
||||
size_t result = ReadFile(handle, (u8 *)&data[0], dataSize);
|
||||
size_t result = ReadFile(handle, data.data(), dataSize);
|
||||
CloseFile(handle);
|
||||
|
||||
if (result != dataSize)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue