reimplemented add and appendBlankRecord via insertRecord

This commit is contained in:
Marc Zinnschlag 2013-10-27 14:13:10 +01:00
parent 525d6fadec
commit 9a80e11182

View file

@ -152,8 +152,7 @@ namespace CSMWorld
record2.mState = Record<ESXRecordT>::State_ModifiedOnly;
record2.mModified = record;
mRecords.push_back (record2);
mIndex.insert (std::make_pair (Misc::StringUtils::lowerCase (id), mRecords.size()-1));
insertRecord (record2, mRecords.size());
}
else
{
@ -270,7 +269,12 @@ namespace CSMWorld
ESXRecordT record;
IdAccessorT().getId (record) = id;
record.blank();
add (record);
Record<ESXRecordT> record2;
record2.mState = Record<ESXRecordT>::State_ModifiedOnly;
record2.mModified = record;
insertRecord (record2, mRecords.size(), type);
}
template<typename ESXRecordT, typename IdAccessorT>