About SwTable::CheckConsistency() (sw module)
julien2412
serval2412 at yahoo.fr
Sat Sep 21 03:55:16 PDT 2013
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.
More information about the LibreOffice
mailing list