mirror of
https://github.com/hrydgard/ppsspp.git
synced 2025-04-02 11:01:50 -04:00
Use remove_if correctly.
This commit is contained in:
parent
ae6e0d182e
commit
f54b5e03be
1 changed files with 3 additions and 1 deletions
|
@ -1516,10 +1516,12 @@ void Config::RemoveRecent(const std::string &file) {
|
|||
std::lock_guard<std::mutex> guard(private_->recentIsosLock);
|
||||
|
||||
const auto &filename = File::ResolvePath(file);
|
||||
std::remove_if(recentIsos.begin(), recentIsos.end(), [filename](const auto &str) {
|
||||
auto iter = std::remove_if(recentIsos.begin(), recentIsos.end(), [filename](const auto &str) {
|
||||
const auto &recent = File::ResolvePath(str);
|
||||
return filename == recent;
|
||||
});
|
||||
// remove_if is weird.
|
||||
recentIsos.erase(iter, recentIsos.end());
|
||||
}
|
||||
|
||||
void Config::CleanRecent() {
|
||||
|
|
Loading…
Add table
Reference in a new issue