mirror of
https://github.com/PabloMK7/citra.git
synced 2024-11-28 10:20:17 +00:00
log/backend: Make use of erase_if
Same behavior, but less verbose.
This commit is contained in:
parent
173b84c8ff
commit
399f3d4e32
1 changed files with 4 additions and 4 deletions
|
@ -57,10 +57,10 @@ public:
|
||||||
|
|
||||||
void RemoveBackend(std::string_view backend_name) {
|
void RemoveBackend(std::string_view backend_name) {
|
||||||
std::lock_guard lock{writing_mutex};
|
std::lock_guard lock{writing_mutex};
|
||||||
const auto it =
|
|
||||||
std::remove_if(backends.begin(), backends.end(),
|
std::erase_if(backends, [&backend_name](const auto& backend) {
|
||||||
[&backend_name](const auto& i) { return backend_name == i->GetName(); });
|
return backend_name == backend->GetName();
|
||||||
backends.erase(it, backends.end());
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
Backend* GetBackend(std::string_view backend_name) {
|
Backend* GetBackend(std::string_view backend_name) {
|
||||||
|
|
Loading…
Reference in a new issue