Kaydet (Commit) c06fe7e2 authored tarafından Caolán McNamara's avatar Caolán McNamara

Resolves: fdo#52013 use vector::insert instead

Change-Id: I3cbc0c0751c069ff9bc7d8b1b737fcfdc3be2b9d
üst 1b31d5fb
...@@ -400,8 +400,7 @@ public: ...@@ -400,8 +400,7 @@ public:
SwpHstry::iterator itSourceBegin = pIns->m_SwpHstry.begin() + nStart; SwpHstry::iterator itSourceBegin = pIns->m_SwpHstry.begin() + nStart;
SwpHstry::iterator itSourceEnd = pIns->m_SwpHstry.end(); SwpHstry::iterator itSourceEnd = pIns->m_SwpHstry.end();
if (itSourceBegin == itSourceEnd) return; if (itSourceBegin == itSourceEnd) return;
m_SwpHstry.reserve(nPos + static_cast<size_t>(itSourceEnd - itSourceBegin)); m_SwpHstry.insert(m_SwpHstry.begin() + nPos, itSourceBegin, itSourceEnd);
std::copy( itSourceBegin, itSourceEnd, m_SwpHstry.begin() + nPos );
pIns->m_SwpHstry.erase( itSourceBegin, itSourceEnd ); pIns->m_SwpHstry.erase( itSourceBegin, itSourceEnd );
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment