diff options
author | Franco M <francomaro@gmail.com> | 2023-10-18 06:06:58 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-10-18 06:06:58 +0200 |
commit | 59b6ada7b7ef44ca883613567459b7156e55e1c8 (patch) | |
tree | ab8892a2edf7ef24be813ce45726ed9f053a48fd /src/core/file_sys/vfs_layered.cpp | |
parent | Final refactorization (diff) | |
parent | Merge pull request #11774 from liamwhite/refcount-issue (diff) | |
download | yuzu-59b6ada7b7ef44ca883613567459b7156e55e1c8.tar yuzu-59b6ada7b7ef44ca883613567459b7156e55e1c8.tar.gz yuzu-59b6ada7b7ef44ca883613567459b7156e55e1c8.tar.bz2 yuzu-59b6ada7b7ef44ca883613567459b7156e55e1c8.tar.lz yuzu-59b6ada7b7ef44ca883613567459b7156e55e1c8.tar.xz yuzu-59b6ada7b7ef44ca883613567459b7156e55e1c8.tar.zst yuzu-59b6ada7b7ef44ca883613567459b7156e55e1c8.zip |
Diffstat (limited to 'src/core/file_sys/vfs_layered.cpp')
-rw-r--r-- | src/core/file_sys/vfs_layered.cpp | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/core/file_sys/vfs_layered.cpp b/src/core/file_sys/vfs_layered.cpp index 3e6426afc..08daca397 100644 --- a/src/core/file_sys/vfs_layered.cpp +++ b/src/core/file_sys/vfs_layered.cpp @@ -38,7 +38,7 @@ VirtualDir LayeredVfsDirectory::GetDirectoryRelative(std::string_view path) cons for (const auto& layer : dirs) { auto dir = layer->GetDirectoryRelative(path); if (dir != nullptr) { - out.push_back(std::move(dir)); + out.emplace_back(std::move(dir)); } } @@ -62,11 +62,11 @@ std::vector<VirtualFile> LayeredVfsDirectory::GetFiles() const { std::set<std::string, std::less<>> out_names; for (const auto& layer : dirs) { - for (const auto& file : layer->GetFiles()) { + for (auto& file : layer->GetFiles()) { auto file_name = file->GetName(); if (!out_names.contains(file_name)) { out_names.emplace(std::move(file_name)); - out.push_back(file); + out.emplace_back(std::move(file)); } } } @@ -86,7 +86,7 @@ std::vector<VirtualDir> LayeredVfsDirectory::GetSubdirectories() const { std::vector<VirtualDir> out; out.reserve(names.size()); for (const auto& subdir : names) - out.push_back(GetSubdirectory(subdir)); + out.emplace_back(GetSubdirectory(subdir)); return out; } |