Watches: Make use of std::erase_if

This commit is contained in:
Lioncash 2023-12-12 13:24:40 -05:00
parent 2c6bf2d224
commit 50e4dc5dba
1 changed files with 1 additions and 3 deletions

View File

@ -43,9 +43,7 @@ const std::vector<Watch>& Watches::GetWatches() const
void Watches::UnsetWatch(u32 address)
{
m_watches.erase(std::remove_if(m_watches.begin(), m_watches.end(),
[address](const auto& watch) { return watch.address == address; }),
m_watches.end());
std::erase_if(m_watches, [address](const auto& watch) { return watch.address == address; });
}
void Watches::UpdateWatch(std::size_t index, u32 address, std::string name)