BreakPoints: Use std::any_of where applicable
This commit is contained in:
parent
e97953130d
commit
b760479f77
|
@ -4,6 +4,7 @@
|
||||||
|
|
||||||
#include "Core/PowerPC/BreakPoints.h"
|
#include "Core/PowerPC/BreakPoints.h"
|
||||||
|
|
||||||
|
#include <algorithm>
|
||||||
#include <sstream>
|
#include <sstream>
|
||||||
#include <string>
|
#include <string>
|
||||||
#include <vector>
|
#include <vector>
|
||||||
|
@ -15,20 +16,15 @@
|
||||||
|
|
||||||
bool BreakPoints::IsAddressBreakPoint(u32 address) const
|
bool BreakPoints::IsAddressBreakPoint(u32 address) const
|
||||||
{
|
{
|
||||||
for (const TBreakPoint& bp : m_breakpoints)
|
return std::any_of(m_breakpoints.begin(), m_breakpoints.end(),
|
||||||
if (bp.address == address)
|
[address](const auto& bp) { return bp.address == address; });
|
||||||
return true;
|
|
||||||
|
|
||||||
return false;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
bool BreakPoints::IsTempBreakPoint(u32 address) const
|
bool BreakPoints::IsTempBreakPoint(u32 address) const
|
||||||
{
|
{
|
||||||
for (const TBreakPoint& bp : m_breakpoints)
|
return std::any_of(m_breakpoints.begin(), m_breakpoints.end(), [address](const auto& bp) {
|
||||||
if (bp.address == address && bp.is_temporary)
|
return bp.address == address && bp.is_temporary;
|
||||||
return true;
|
});
|
||||||
|
|
||||||
return false;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
BreakPoints::TBreakPointsStr BreakPoints::GetStrings() const
|
BreakPoints::TBreakPointsStr BreakPoints::GetStrings() const
|
||||||
|
@ -233,11 +229,8 @@ bool TMemCheck::Action(DebugInterface* debug_interface, u32 value, u32 addr, boo
|
||||||
|
|
||||||
bool Watches::IsAddressWatch(u32 address) const
|
bool Watches::IsAddressWatch(u32 address) const
|
||||||
{
|
{
|
||||||
for (const TWatch& watch : m_watches)
|
return std::any_of(m_watches.begin(), m_watches.end(),
|
||||||
if (watch.address == address)
|
[address](const auto& watch) { return watch.address == address; });
|
||||||
return true;
|
|
||||||
|
|
||||||
return false;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
Watches::TWatchesStr Watches::GetStrings() const
|
Watches::TWatchesStr Watches::GetStrings() const
|
||||||
|
|
Loading…
Reference in New Issue