aboutsummaryrefslogtreecommitdiff
path: root/src/core/file_sys/vfs_offset.cpp
diff options
context:
space:
mode:
authorLioncash <mathew1800@gmail.com>2018-07-20 21:51:28 -0400
committerLioncash <mathew1800@gmail.com>2018-07-20 21:51:30 -0400
commit25510961ea2a389c4fad84f0013002844a3aea05 (patch)
tree7dda073351a806d63cdf9ad04f08a4a54173bcb8 /src/core/file_sys/vfs_offset.cpp
parente523ab8b03099dda7c91859b370a4cd22e58e0bd (diff)
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.
Diffstat (limited to 'src/core/file_sys/vfs_offset.cpp')
-rw-r--r--src/core/file_sys/vfs_offset.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/core/file_sys/vfs_offset.cpp b/src/core/file_sys/vfs_offset.cpp
index 31fdd9aa19..38ec4e0f97 100644
--- a/src/core/file_sys/vfs_offset.cpp
+++ b/src/core/file_sys/vfs_offset.cpp
@@ -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);
}