mirror of
https://gitlab.com/OpenMW/openmw.git
synced 2025-02-24 18:39:59 +00:00
Add assertion to Store
This commit is contained in:
parent
1b302b750c
commit
dfdf26e95e
@ -140,8 +140,8 @@ namespace MWWorld
|
|||||||
virtual void clearDynamic()
|
virtual void clearDynamic()
|
||||||
{
|
{
|
||||||
// remove the dynamic part of mShared
|
// remove the dynamic part of mShared
|
||||||
if (mShared.size() > mStatic.size())
|
assert(mShared.size() >= mStatic.size());
|
||||||
mShared.erase(mShared.begin() + mStatic.size(), mShared.end());
|
mShared.erase(mShared.begin() + mStatic.size(), mShared.end());
|
||||||
mDynamic.clear();
|
mDynamic.clear();
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -304,8 +304,8 @@ namespace MWWorld
|
|||||||
mDynamic.erase(it);
|
mDynamic.erase(it);
|
||||||
|
|
||||||
// have to reinit the whole shared part
|
// 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());
|
mShared.erase(mShared.begin() + mStatic.size(), mShared.end());
|
||||||
for (it = mDynamic.begin(); it != mDynamic.end(); ++it) {
|
for (it = mDynamic.begin(); it != mDynamic.end(); ++it) {
|
||||||
mShared.push_back(&it->second);
|
mShared.push_back(&it->second);
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user