From 894b0de0f2cd15655726ae885b44b030711328a3 Mon Sep 17 00:00:00 2001 From: Lioncash Date: Fri, 20 Jul 2018 21:51:28 -0400 Subject: 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. --- src/core/file_sys/vfs_offset.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/core/file_sys/vfs_offset.cpp') diff --git a/src/core/file_sys/vfs_offset.cpp b/src/core/file_sys/vfs_offset.cpp index 31fdd9aa1..38ec4e0f9 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 data, size_t r_offset) { +size_t OffsetVfsFile::WriteBytes(const std::vector& data, size_t r_offset) { return file->Write(data.data(), TrimToFit(data.size(), r_offset), offset + r_offset); } -- cgit v1.2.3