diff options
author | Caolán McNamara <caolanm@redhat.com> | 2018-04-19 14:43:40 +0100 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2018-04-20 12:20:01 +0200 |
commit | 9887cd14e2777eed019aacfd0ac75554686c6b79 (patch) | |
tree | f1979a832227ea5030836814bf4eb9b414032f8c /sw | |
parent | f5a9fb18b2b523e517ab425948c4488fe19e39a8 (diff) |
use a map to avoid looping on every obj delete
Change-Id: I47ff4f0f959b7d09fc91593b7dacb3d1a2b50472
Reviewed-on: https://gerrit.libreoffice.org/53164
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
Tested-by: Caolán McNamara <caolanm@redhat.com>
Diffstat (limited to 'sw')
-rw-r--r-- | sw/source/filter/ww8/ww8graf.cxx | 5 | ||||
-rw-r--r-- | sw/source/filter/ww8/ww8par.cxx | 2 |
2 files changed, 3 insertions, 4 deletions
diff --git a/sw/source/filter/ww8/ww8graf.cxx b/sw/source/filter/ww8/ww8graf.cxx index d16d16cfa4af..53a3c3289f71 100644 --- a/sw/source/filter/ww8/ww8graf.cxx +++ b/sw/source/filter/ww8/ww8graf.cxx @@ -2753,10 +2753,9 @@ SwFrameFormat* SwWW8ImplReader::Read_GrafLayer( long nGrafAnchorCp ) */ if (!aData.empty()) { - for (MSDffImportRecords::const_iterator it = aData.begin(); - it != aData.end(); ++it) + for (const auto& it : aData) { - pRecord = it->get(); + pRecord = it.get(); if (pRecord->pObj && pRecord->aTextId.nTxBxS) { // #i52825# pRetFrameFormat can be NULL pRetFrameFormat = MungeTextIntoDrawBox( diff --git a/sw/source/filter/ww8/ww8par.cxx b/sw/source/filter/ww8/ww8par.cxx index befa3c2eb51a..1b735a0b02a0 100644 --- a/sw/source/filter/ww8/ww8par.cxx +++ b/sw/source/filter/ww8/ww8par.cxx @@ -1040,7 +1040,7 @@ SdrObject* SwMSDffManager::ProcessObj(SvStream& rSt, { // Complement Import Record List pImpRec->pObj = pObj; - rImportData.m_Records.insert(std::unique_ptr<SvxMSDffImportRec>(pImpRec)); + rImportData.insert(pImpRec); // Complement entry in Z Order List with a pointer to this Object // Only store objects which are not deep inside the tree |