diff options
| author | 2018-07-20 22:30:20 -0400 | |
|---|---|---|
| committer | 2018-07-20 22:30:22 -0400 | |
| commit | b46c0ed1fa07698297d5cf645b97a1978092868d (patch) | |
| tree | ae58cf355582de44ae680687df12c766ca1a9d79 | |
| parent | partition_filesystem, vfs_real: Add missing standard includes (diff) | |
| download | yuzu-b46c0ed1fa07698297d5cf645b97a1978092868d.tar.gz yuzu-b46c0ed1fa07698297d5cf645b97a1978092868d.tar.xz yuzu-b46c0ed1fa07698297d5cf645b97a1978092868d.zip | |
vfs_real: Remove redundant copying of std::vector instances in GetFiles() and GetSubdirectories()
We already return by value, so we don't explicitly need to make the
copy.
| -rw-r--r-- | src/core/file_sys/vfs_real.cpp | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/src/core/file_sys/vfs_real.cpp b/src/core/file_sys/vfs_real.cpp index 8df6e97ef..f27fb1f2a 100644 --- a/src/core/file_sys/vfs_real.cpp +++ b/src/core/file_sys/vfs_real.cpp | |||
| @@ -3,6 +3,7 @@ | |||
| 3 | // Refer to the license.txt file included. | 3 | // Refer to the license.txt file included. |
| 4 | 4 | ||
| 5 | #include <algorithm> | 5 | #include <algorithm> |
| 6 | #include <cstddef> | ||
| 6 | #include <iterator> | 7 | #include <iterator> |
| 7 | #include <utility> | 8 | #include <utility> |
| 8 | 9 | ||
| @@ -108,11 +109,11 @@ RealVfsDirectory::RealVfsDirectory(const std::string& path_, Mode perms_) | |||
| 108 | } | 109 | } |
| 109 | 110 | ||
| 110 | std::vector<std::shared_ptr<VfsFile>> RealVfsDirectory::GetFiles() const { | 111 | std::vector<std::shared_ptr<VfsFile>> RealVfsDirectory::GetFiles() const { |
| 111 | return std::vector<std::shared_ptr<VfsFile>>(files); | 112 | return files; |
| 112 | } | 113 | } |
| 113 | 114 | ||
| 114 | std::vector<std::shared_ptr<VfsDirectory>> RealVfsDirectory::GetSubdirectories() const { | 115 | std::vector<std::shared_ptr<VfsDirectory>> RealVfsDirectory::GetSubdirectories() const { |
| 115 | return std::vector<std::shared_ptr<VfsDirectory>>(subdirectories); | 116 | return subdirectories; |
| 116 | } | 117 | } |
| 117 | 118 | ||
| 118 | bool RealVfsDirectory::IsWritable() const { | 119 | bool RealVfsDirectory::IsWritable() const { |