summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLostDragonist <lost.dragonist@gmail.com>2019-01-01 00:57:12 -0600
committerLostDragonist <lost.dragonist@gmail.com>2019-01-01 01:18:40 -0600
commit858930cb461988adec846bdf96fad6f600b81cd6 (patch)
treeda8a82877405579e3c7f805baaea0beaec677fc0
parentba57657b4f2322b7b980cca5f0e839c4b74e7384 (diff)
Change find_if to remove_if
-rw-r--r--src/shared/directoryentry.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/shared/directoryentry.cpp b/src/shared/directoryentry.cpp
index 602d58c7..9f54e526 100644
--- a/src/shared/directoryentry.cpp
+++ b/src/shared/directoryentry.cpp
@@ -332,7 +332,7 @@ bool FileEntry::removeOrigin(int origin)
return true;
}
} else {
- std::vector<std::pair<int, std::pair<std::wstring, int>>>::iterator newEnd = std::find_if(m_Alternatives.begin(), m_Alternatives.end(), [&](const std::pair<int, std::pair<std::wstring, int>> &i) -> bool { return i.first == origin; });
+ auto newEnd = std::remove_if(m_Alternatives.begin(), m_Alternatives.end(), [&](auto &i) -> bool { return i.first == origin; });
if (newEnd != m_Alternatives.end())
m_Alternatives.erase(newEnd, m_Alternatives.end());
}