diff options
author | Lioncash <mathew1800@gmail.com> | 2018-08-02 17:36:01 +0200 |
---|---|---|
committer | Lioncash <mathew1800@gmail.com> | 2018-08-02 17:37:39 +0200 |
commit | cec9e9b811b18810ceabaddc4a20d575993e046b (patch) | |
tree | 14bb332db66bf843a2e6bb0c4aaa8fe2ae25eeab /src | |
parent | Merge pull request #896 from lioncash/audio-out (diff) | |
download | yuzu-cec9e9b811b18810ceabaddc4a20d575993e046b.tar yuzu-cec9e9b811b18810ceabaddc4a20d575993e046b.tar.gz yuzu-cec9e9b811b18810ceabaddc4a20d575993e046b.tar.bz2 yuzu-cec9e9b811b18810ceabaddc4a20d575993e046b.tar.lz yuzu-cec9e9b811b18810ceabaddc4a20d575993e046b.tar.xz yuzu-cec9e9b811b18810ceabaddc4a20d575993e046b.tar.zst yuzu-cec9e9b811b18810ceabaddc4a20d575993e046b.zip |
Diffstat (limited to 'src')
-rw-r--r-- | src/core/file_sys/vfs_vector.cpp | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/src/core/file_sys/vfs_vector.cpp b/src/core/file_sys/vfs_vector.cpp index 4c6337e3a..e3f5026a8 100644 --- a/src/core/file_sys/vfs_vector.cpp +++ b/src/core/file_sys/vfs_vector.cpp @@ -3,6 +3,7 @@ // Refer to the license.txt file included. #include <algorithm> +#include <utility> #include "core/file_sys/vfs_vector.h" namespace FileSys { @@ -31,13 +32,15 @@ bool VectorVfsDirectory::IsReadable() const { std::string VectorVfsDirectory::GetName() const { return name; } + std::shared_ptr<VfsDirectory> VectorVfsDirectory::GetParentDirectory() const { return parent; } template <typename T> static bool FindAndRemoveVectorElement(std::vector<T>& vec, std::string_view name) { - auto iter = std::find_if(vec.begin(), vec.end(), [name](T e) { return e->GetName() == name; }); + auto iter = + std::find_if(vec.begin(), vec.end(), [name](const T& e) { return e->GetName() == name; }); if (iter == vec.end()) return false; auto old_size = vec.size(); @@ -77,7 +80,7 @@ void VectorVfsDirectory::AddDirectory(VirtualDir dir) { bool VectorVfsDirectory::ReplaceFileWithSubdirectory(VirtualFile file, VirtualDir dir) { if (!DeleteFile(file->GetName())) return false; - dirs.emplace_back(dir); + dirs.emplace_back(std::move(dir)); return true; } } // namespace FileSys |