From 58e9acf191749975f2b7edad9674b24025db74fa Mon Sep 17 00:00:00 2001 From: TA Thanh Dinh Date: Fri, 16 Oct 2020 15:06:53 +0200 Subject: [PATCH] Using prefix increment instead of suffix one for iterators --- Windows/debugger.cpp | 2 +- tinyinst.cpp | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/Windows/debugger.cpp b/Windows/debugger.cpp index 09d0b7e..1140669 100755 --- a/Windows/debugger.cpp +++ b/Windows/debugger.cpp @@ -43,7 +43,7 @@ limitations under the License. // cleans up all breakpoint structures // does not actually remove breakpoints in target process void Debugger::DeleteBreakpoints() { - for (auto iter = breakpoints.begin(); iter != breakpoints.end(); iter++) { + for (auto iter = breakpoints.begin(); iter != breakpoints.end(); ++iter) { delete *iter; } breakpoints.clear(); diff --git a/tinyinst.cpp b/tinyinst.cpp index b60e4b8..c6c2f3f 100755 --- a/tinyinst.cpp +++ b/tinyinst.cpp @@ -138,7 +138,7 @@ TinyInst::ModuleInfo::ModuleInfo() { void TinyInst::ModuleInfo::ClearInstrumentation() { instrumented = false; - for (auto iter = executable_ranges.begin(); iter != executable_ranges.end(); iter++) { + for (auto iter = executable_ranges.begin(); iter != executable_ranges.end(); ++iter) { if (iter->data) free(iter->data); } executable_ranges.clear();