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
|
@ -85,7 +85,7 @@ struct VfsFile : NonCopyable {
|
|||
virtual bool WriteByte(u8 data, size_t offset = 0);
|
||||
// Writes a vector of bytes to offset in file and returns the number of bytes successfully
|
||||
// written.
|
||||
virtual size_t WriteBytes(std::vector<u8> data, size_t offset = 0);
|
||||
virtual size_t WriteBytes(const std::vector<u8>& data, size_t offset = 0);
|
||||
|
||||
// Writes an array of type T, size number_elements to offset in file.
|
||||
// Returns the number of bytes (sizeof(T)*number_elements) written successfully.
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue