|
|
@ -187,6 +187,9 @@ namespace MWWorld
|
|
|
|
T item;
|
|
|
|
T item;
|
|
|
|
item.mId = Misc::StringUtils::lowerCase(id);
|
|
|
|
item.mId = Misc::StringUtils::lowerCase(id);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
typename std::map<std::string, T>::iterator it = mStatic.find(item.mId);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if (it != mStatic.end() && Misc::StringUtils::ciEqual(it->second.mId, id)) {
|
|
|
|
// delete from the static part of mShared
|
|
|
|
// delete from the static part of mShared
|
|
|
|
typename std::vector<T *>::iterator sharedIter = mShared.begin();
|
|
|
|
typename std::vector<T *>::iterator sharedIter = mShared.begin();
|
|
|
|
for (; sharedIter != (mShared.begin()+mStatic.size()); ++sharedIter) {
|
|
|
|
for (; sharedIter != (mShared.begin()+mStatic.size()); ++sharedIter) {
|
|
|
@ -195,10 +198,6 @@ namespace MWWorld
|
|
|
|
break;
|
|
|
|
break;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
typename std::map<std::string, T>::iterator it = mStatic.find(item.mId);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if (it != mStatic.end() && Misc::StringUtils::ciEqual(it->second.mId, id)) {
|
|
|
|
|
|
|
|
mStatic.erase(it);
|
|
|
|
mStatic.erase(it);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|