We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
2 parents dbcedf6 + 189e4a6 commit 87da40eCopy full SHA for 87da40e
apps/openmw/mwworld/store.cpp
@@ -597,9 +597,10 @@ namespace MWWorld
597
newCell.mAmbi.mFogDensity = 0;
598
newCell.updateId();
599
600
- ESM::Cell* newCellInserted = &mCells.insert(std::make_pair(newCell.mId, newCell)).first->second;
601
-
602
- return mExt.insert(std::make_pair(key, newCellInserted)).first->second;
+ ESM::Cell* newCellInserted = &mCells.emplace(newCell.mId, newCell).first->second;
+ mExt.emplace(key, newCellInserted);
+ mSharedExt.emplace_back(newCellInserted);
603
+ return newCellInserted;
604
}
605
const ESM::Cell* Store<ESM::Cell>::find(const ESM::RefId& id) const
606
{
0 commit comments