diff options
author | Caolán McNamara <caolanm@redhat.com> | 2013-12-19 11:10:09 +0000 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2013-12-19 11:31:13 +0000 |
commit | 976193c1b6d625ab8afa6efc2997ea7771304a83 (patch) | |
tree | 3ed8f6699c7f37ea35fbcbc1efbee46077fbc0ad /hwpfilter | |
parent | 5594f633a19344e7b5043b732c5fc0c944a74eba (diff) |
CID#982609 inefficient iterator usage confusing coverity
Change-Id: I9f170cc8c36fe89e596ee703231ba8abff5564c5
Diffstat (limited to 'hwpfilter')
-rw-r--r-- | hwpfilter/source/hwpreader.cxx | 10 |
1 files changed, 1 insertions, 9 deletions
diff --git a/hwpfilter/source/hwpreader.cxx b/hwpfilter/source/hwpreader.cxx index e9f0f3b62e76..7ed15004edce 100644 --- a/hwpfilter/source/hwpreader.cxx +++ b/hwpfilter/source/hwpreader.cxx @@ -1901,16 +1901,8 @@ void HwpReader::makeTableStyle(Table *tbl) } // --------------- cell --------------------- // - for (int i = 0 ; i < static_cast<int>(tbl->cells.size()); i++) + for (std::list<TCell*>::iterator it = tbl->cells.begin(), aEnd = tbl->cells.end(); it != aEnd; ++it) { - std::list<TCell*>::iterator it = tbl->cells.begin(); - - for( int ii = 0; it != tbl->cells.end(); ++it, ii++ ) - { - if( ii == i ) - break; - } - TCell *tcell = *it; sprintf(buf,"Table%d.%c%d",hbox->style.boxnum, 'A'+ tcell->nColumnIndex, tcell->nRowIndex +1); padd(ascii("style:name"), sXML_CDATA, ascii( buf )); |