From 73c20be29a50a7aa5f34aa9b172deedb26bbf191 Mon Sep 17 00:00:00 2001 From: jvoisin Date: Thu, 22 Jul 2021 22:03:59 +0200 Subject: [PATCH] Use prefix increment for iterators in esmstore.cpp See https://pvs-studio.com/en/docs/warnings/v803/ for the rationale. --- apps/openmw/mwworld/esmstore.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/apps/openmw/mwworld/esmstore.cpp b/apps/openmw/mwworld/esmstore.cpp index ecb2cad021..befe65d641 100644 --- a/apps/openmw/mwworld/esmstore.cpp +++ b/apps/openmw/mwworld/esmstore.cpp @@ -274,9 +274,9 @@ void ESMStore::countRecords() std::vector refs; std::vector refIDs; std::vector readers; - for(auto it = mCells.intBegin(); it != mCells.intEnd(); it++) + for(auto it = mCells.intBegin(); it != mCells.intEnd(); ++it) readRefs(*it, refs, refIDs, readers); - for(auto it = mCells.extBegin(); it != mCells.extEnd(); it++) + for(auto it = mCells.extBegin(); it != mCells.extEnd(); ++it) readRefs(*it, refs, refIDs, readers); const auto lessByRefNum = [] (const Ref& l, const Ref& r) { return l.mRefNum < r.mRefNum; }; std::stable_sort(refs.begin(), refs.end(), lessByRefNum);