On Sun, 2012-07-15 at 08:32 +0900, Takeshi Abe wrote:
> Hi,
>
> Having reproduced fdo#52013 on master, I would like to ask for a favor of
> reviewing
> http://cgit.freedesktop.org/libreoffice/core/commit/?id=7b689371cc344f14af783f87c7fe37f5350c10ab
> for 3.6.
Seems to me that the original conversion of
9c0ca924446933431d736ee0dd37e6852b4947dc should have used vector::insert
rather than std::copy ?, i.e. like the attached
C.
diff --git a/sw/source/core/inc/rolbck.hxx b/sw/source/core/inc/rolbck.hxx
index 982d26e..9bd1214 100644
--- a/sw/source/core/inc/rolbck.hxx
+++ b/sw/source/core/inc/rolbck.hxx
@@ -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 );
}
_______________________________________________
LibreOffice mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/libreoffice