Date: prev next · Thread: first prev next last
2013 Archives by date, by thread · List index


Hi,

I noticed some weird things in SwTable::CheckConsistency(), eg:
   2102     std::list< RowSpanCheck > aRowSpanCells;
   2103     std::list< RowSpanCheck >::iterator aIter = aRowSpanCells.end();

then I see ++aIter several times some lines later.
How can it work since:
aRowSpanCells isn't initialized
aIter is at the end of aRowSpanCells
?
Just nitpicking but I think that this part:
   2128                     std::list< RowSpanCheck >::iterator aEraseIter =
aIter;
   2129                     ++aIter;
   2130                     aRowSpanCells.erase( aEraseIter );
could be replaced by:
aIter = aRowSpanCells.erase(aIter);
since "erase "returns an iterator even before C++11 standard (see
http://www.cplusplus.com/reference/list/list/erase/)

See
http://opengrok.libreoffice.org/xref/core/sw/source/core/table/swnewtable.cxx#2095

Julien



--
View this message in context: 
http://nabble.documentfoundation.org/About-SwTable-CheckConsistency-sw-module-tp4074960.html
Sent from the Dev mailing list archive at Nabble.com.

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.