Resolves: fdo#52013 use vector::insert instead

Change-Id: I3cbc0c0751c069ff9bc7d8b1b737fcfdc3be2b9d
This commit is contained in:
Caolán McNamara
2012-07-15 16:21:44 +01:00
parent 1b31d5fb52
commit c06fe7e201

View File

@@ -400,8 +400,7 @@ public:
SwpHstry::iterator itSourceBegin = pIns->m_SwpHstry.begin() + nStart;
SwpHstry::iterator itSourceEnd = pIns->m_SwpHstry.end();
if (itSourceBegin == itSourceEnd) return;
m_SwpHstry.reserve(nPos + static_cast<size_t>(itSourceEnd - itSourceBegin));
std::copy( itSourceBegin, itSourceEnd, m_SwpHstry.begin() + nPos );
m_SwpHstry.insert(m_SwpHstry.begin() + nPos, itSourceBegin, itSourceEnd);
pIns->m_SwpHstry.erase( itSourceBegin, itSourceEnd );
}