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.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/core/file_sys/vfs.h') diff --git a/src/core/file_sys/vfs.h b/src/core/file_sys/vfs.h index d108ab1f4..db3c77eac 100644 --- a/src/core/file_sys/vfs.h +++ b/src/core/file_sys/vfs.h @@ -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 data, size_t offset = 0); + virtual size_t WriteBytes(const std::vector& 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. -- cgit v1.2.3