vfs: Make WriteBytes() overload taking a std::vector pass the std::vector by const reference
Given the data is intended to be directly written, there's no need to take the std::vector by value and copy the data.
This commit is contained in:
parent
dd09439fee
commit
894b0de0f2
4 changed files with 4 additions and 4 deletions
|
@ -75,7 +75,7 @@ bool OffsetVfsFile::WriteByte(u8 data, size_t r_offset) {
|
|||
return false;
|
||||
}
|
||||
|
||||
size_t OffsetVfsFile::WriteBytes(std::vector<u8> data, size_t r_offset) {
|
||||
size_t OffsetVfsFile::WriteBytes(const std::vector<u8>& data, size_t r_offset) {
|
||||
return file->Write(data.data(), TrimToFit(data.size(), r_offset), offset + r_offset);
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue