summaryrefslogtreecommitdiffstats
path: root/src/core
diff options
context:
space:
mode:
authorLioncash <mathew1800@gmail.com>2018-08-02 17:40:20 +0200
committerLioncash <mathew1800@gmail.com>2018-08-02 17:40:24 +0200
commit42a4c6b79e2ee25f0c07f7fd1d2b22eaa8ef6f26 (patch)
tree2895d90814b80562e7081bcfe6c6b0352d589621 /src/core
parentvfs_vector: Avoid unnecessary copies where applicable (diff)
downloadyuzu-42a4c6b79e2ee25f0c07f7fd1d2b22eaa8ef6f26.tar
yuzu-42a4c6b79e2ee25f0c07f7fd1d2b22eaa8ef6f26.tar.gz
yuzu-42a4c6b79e2ee25f0c07f7fd1d2b22eaa8ef6f26.tar.bz2
yuzu-42a4c6b79e2ee25f0c07f7fd1d2b22eaa8ef6f26.tar.lz
yuzu-42a4c6b79e2ee25f0c07f7fd1d2b22eaa8ef6f26.tar.xz
yuzu-42a4c6b79e2ee25f0c07f7fd1d2b22eaa8ef6f26.tar.zst
yuzu-42a4c6b79e2ee25f0c07f7fd1d2b22eaa8ef6f26.zip
Diffstat (limited to 'src/core')
-rw-r--r--src/core/file_sys/vfs_vector.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/core/file_sys/vfs_vector.cpp b/src/core/file_sys/vfs_vector.cpp
index e3f5026a8..fda603960 100644
--- a/src/core/file_sys/vfs_vector.cpp
+++ b/src/core/file_sys/vfs_vector.cpp
@@ -39,11 +39,11 @@ std::shared_ptr<VfsDirectory> VectorVfsDirectory::GetParentDirectory() const {
template <typename T>
static bool FindAndRemoveVectorElement(std::vector<T>& vec, std::string_view name) {
- auto iter =
+ const 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();
+
vec.erase(iter);
return true;
}