mirror of
https://gitlab.com/OpenMW/openmw.git
synced 2025-01-01 03:21:41 +00:00
Merge branch 'esmstore_infix' into 'master'
Use prefix increment for iterators in esmstore.cpp See merge request OpenMW/openmw!1041
This commit is contained in:
commit
e371831086
@ -274,9 +274,9 @@ void ESMStore::countRecords()
|
||||
std::vector<Ref> refs;
|
||||
std::vector<std::string> refIDs;
|
||||
std::vector<ESM::ESMReader> 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);
|
||||
|
Loading…
Reference in New Issue
Block a user