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:
Lioncash 2018-07-20 21:51:28 -04:00
parent dd09439fee
commit 894b0de0f2
4 changed files with 4 additions and 4 deletions

View file

@ -42,7 +42,7 @@ bool VfsFile::WriteByte(u8 data, size_t offset) {
return Write(&data, 1, offset) == 1;
}
size_t VfsFile::WriteBytes(std::vector<u8> data, size_t offset) {
size_t VfsFile::WriteBytes(const std::vector<u8>& data, size_t offset) {
return Write(data.data(), data.size(), offset);
}