1
0
Fork 0
mirror of https://github.com/OpenMW/openmw.git synced 2025-02-06 13:45:34 +00:00

Use ESM::RefId as key for MergeReferencesStage::mIndex

This commit is contained in:
elsid 2023-03-03 00:02:56 +01:00
parent eb17f0ba06
commit 4cb095ce39
No known key found for this signature in database
GPG key ID: 4DE04C198CBA7625
2 changed files with 2 additions and 3 deletions

View file

@ -15,7 +15,6 @@
#include <components/esm3/cellref.hpp> #include <components/esm3/cellref.hpp>
#include <components/esm3/esmreader.hpp> #include <components/esm3/esmreader.hpp>
#include <components/misc/strings/lower.hpp>
#include "mergestate.hpp" #include "mergestate.hpp"
@ -117,7 +116,7 @@ void CSMTools::MergeReferencesStage::perform(int stage, CSMDoc::Messages& messag
ref.mOriginalCell = ref.mCell; ref.mOriginalCell = ref.mCell;
ref.mRefNum.mIndex = mIndex[Misc::StringUtils::lowerCase(ref.mCell.getRefIdString())]++; ref.mRefNum.mIndex = mIndex[ref.mCell]++;
ref.mRefNum.mContentFile = 0; ref.mRefNum.mContentFile = 0;
ref.mNew = false; ref.mNew = false;

View file

@ -113,7 +113,7 @@ namespace CSMTools
class MergeReferencesStage : public CSMDoc::Stage class MergeReferencesStage : public CSMDoc::Stage
{ {
MergeState& mState; MergeState& mState;
std::map<std::string, int> mIndex; std::map<ESM::RefId, int> mIndex;
public: public:
MergeReferencesStage(MergeState& state); MergeReferencesStage(MergeState& state);