On 13/07/12 16:39, Noel Grandin wrote:
Hi
This patch series continues the journey of converting SV_DECL_PTRARR to
modern STL containers.
thanks, pushed to master
patch #2 had this, which is undefined behaviour because the order in
which the parameters of the != expression is evaluated is undefined, so
it could happen that end() is evaluated first which would be wrong:
- if (pParent->pData->GetSeqNo() && !aUsedSeqNo.Insert(pParent, nPos)) // already there
+ if ( pParent->pData->GetSeqNo() && (it = aUsedSeqNo.insert(pParent).first) !=
aUsedSeqNo.end() ) // already there
patch #13 removed a "delete", introducing a memory leak; it would be
ideal to use std::auto_ptr::release() here but unfortunately somebody
decided to deprecate that, so back to the delete...
patch #19 was missing some end() checks before incrementing iterators
Also included are updates to o3tl::sorted_vector based on comments from
David Tardon.
furthermore i've done some tweaks to the sorted_vector, to fix a very
mysterious error from GCC 4.7 which claimed that vector is not a
template (?), and also removed the by-value non-const operator[] which
doesn't make much sense to me or the people on IRC that i asked.
Context
Privacy Policy |
Impressum (Legal Info) |
Copyright information: Unless otherwise specified, all text and images
on this website are licensed under the
Creative Commons Attribution-Share Alike 3.0 License.
This does not include the source code of LibreOffice, which is
licensed under the Mozilla Public License (
MPLv2).
"LibreOffice" and "The Document Foundation" are
registered trademarks of their corresponding registered owners or are
in actual use as trademarks in one or more countries. Their respective
logos and icons are also subject to international copyright laws. Use
thereof is explained in our
trademark policy.