2
1
Fork 0
mirror of https://github.com/yuzu-emu/yuzu.git synced 2024-07-04 23:31:19 +01:00

break_points.cpp: return directly from conditionals

This commit is contained in:
archshift 2014-08-12 04:04:54 -07:00
parent e3efc613fd
commit 1a2604902f

View file

@ -13,18 +13,14 @@ bool BreakPoints::IsAddressBreakPoint(u32 iAddress)
{ {
auto cond = [&iAddress](const TBreakPoint& bp) { return bp.iAddress == iAddress; }; auto cond = [&iAddress](const TBreakPoint& bp) { return bp.iAddress == iAddress; };
auto it = std::find_if(m_BreakPoints.begin(), m_BreakPoints.end(), cond); auto it = std::find_if(m_BreakPoints.begin(), m_BreakPoints.end(), cond);
if (it != m_BreakPoints.end()) return it != m_BreakPoints.end();
return true;
return false;
} }
bool BreakPoints::IsTempBreakPoint(u32 iAddress) bool BreakPoints::IsTempBreakPoint(u32 iAddress)
{ {
auto cond = [&iAddress](const TBreakPoint& bp) { return bp.iAddress == iAddress && bp.bTemporary; }; auto cond = [&iAddress](const TBreakPoint& bp) { return bp.iAddress == iAddress && bp.bTemporary; };
auto it = std::find_if(m_BreakPoints.begin(), m_BreakPoints.end(), cond); auto it = std::find_if(m_BreakPoints.begin(), m_BreakPoints.end(), cond);
if (it != m_BreakPoints.end()) return it != m_BreakPoints.end();
return true;
return false;
} }
BreakPoints::TBreakPointsStr BreakPoints::GetStrings() const BreakPoints::TBreakPointsStr BreakPoints::GetStrings() const