From c27b446d6731140f74109692ed93b86278e898a2 Mon Sep 17 00:00:00 2001 From: Peter Veenstra Date: Tue, 26 Sep 2017 07:50:31 +0000 Subject: [PATCH] empty is always constant, while size can be linear on older gcc versions. (wjp) Imported-from: https://svn.code.sf.net/p/dosbox/code-0/dosbox/trunk@4054 --- src/debug/debug.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/debug/debug.cpp b/src/debug/debug.cpp index b6cbc61b..f93b2985 100644 --- a/src/debug/debug.cpp +++ b/src/debug/debug.cpp @@ -448,7 +448,7 @@ bool CBreakpoint::CheckBreakpoint(Bitu seg, Bitu off) // Checks if breakpoint is valid and should stop execution { // Quick exit if there are no breakpoints - if (BPoints.size() == 0) return false; + if (BPoints.empty()) return false; // Search matching breakpoint std::list::iterator i; @@ -508,6 +508,8 @@ bool CBreakpoint::CheckBreakpoint(Bitu seg, Bitu off) bool CBreakpoint::CheckIntBreakpoint(PhysPt adr, Bit8u intNr, Bit16u ahValue, Bit16u alValue) // Checks if interrupt breakpoint is valid and should stop execution { + if (BPoints.empty()) return false; + // Search matching breakpoint std::list::iterator i; CBreakpoint* bp;