forked from teamnwah/openmw-tes3coop
Add assertion to Store
This commit is contained in:
parent
1b302b750c
commit
dfdf26e95e
1 changed files with 4 additions and 4 deletions
|
@ -140,7 +140,7 @@ namespace MWWorld
|
|||
virtual void clearDynamic()
|
||||
{
|
||||
// remove the dynamic part of mShared
|
||||
if (mShared.size() > mStatic.size())
|
||||
assert(mShared.size() >= mStatic.size());
|
||||
mShared.erase(mShared.begin() + mStatic.size(), mShared.end());
|
||||
mDynamic.clear();
|
||||
}
|
||||
|
@ -304,7 +304,7 @@ namespace MWWorld
|
|||
mDynamic.erase(it);
|
||||
|
||||
// have to reinit the whole shared part
|
||||
if (mShared.size() > mStatic.size())
|
||||
assert(mShared.size() >= mStatic.size());
|
||||
mShared.erase(mShared.begin() + mStatic.size(), mShared.end());
|
||||
for (it = mDynamic.begin(); it != mDynamic.end(); ++it) {
|
||||
mShared.push_back(&it->second);
|
||||
|
|
Loading…
Reference in a new issue