summaryrefslogtreecommitdiff
path: root/src/core/file_sys/vfs.cpp
diff options
context:
space:
mode:
authorGravatar Lioncash2018-07-20 21:51:28 -0400
committerGravatar Lioncash2018-07-20 21:51:30 -0400
commit894b0de0f2cd15655726ae885b44b030711328a3 (patch)
tree7dda073351a806d63cdf9ad04f08a4a54173bcb8 /src/core/file_sys/vfs.cpp
parentvfs: Use variable template variants of std::is_trivially_copyable (diff)
downloadyuzu-894b0de0f2cd15655726ae885b44b030711328a3.tar.gz
yuzu-894b0de0f2cd15655726ae885b44b030711328a3.tar.xz
yuzu-894b0de0f2cd15655726ae885b44b030711328a3.zip
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.cpp')
-rw-r--r--src/core/file_sys/vfs.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/core/file_sys/vfs.cpp b/src/core/file_sys/vfs.cpp
index 16c8ad90b..3f690f12a 100644
--- a/src/core/file_sys/vfs.cpp
+++ b/src/core/file_sys/vfs.cpp
@@ -42,7 +42,7 @@ bool VfsFile::WriteByte(u8 data, size_t offset) {
42 return Write(&data, 1, offset) == 1; 42 return Write(&data, 1, offset) == 1;
43} 43}
44 44
45size_t VfsFile::WriteBytes(std::vector<u8> data, size_t offset) { 45size_t VfsFile::WriteBytes(const std::vector<u8>& data, size_t offset) {
46 return Write(data.data(), data.size(), offset); 46 return Write(data.data(), data.size(), offset);
47} 47}
48 48