summaryrefslogtreecommitdiff
path: root/svx
diff options
context:
space:
mode:
authorNoel Grandin <noelgrandin@gmail.com>2023-05-12 19:47:05 +0200
committerNoel Grandin <noel.grandin@collabora.co.uk>2023-05-13 14:55:56 +0200
commit3168d1ab07239789cd36a5960cef2d13ae29c9de (patch)
tree344b92c257f9e70119d13b51e06abc74d12f40f3 /svx
parent5351b8789805154219fe57b92b41b17c0e0cd765 (diff)
use more optional for SdrObjListIter
Change-Id: Iffd99d820889a1a5be514d46191ffaa2a6fa6910 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/151721 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'svx')
-rw-r--r--svx/source/form/fmshimp.cxx8
1 files changed, 4 insertions, 4 deletions
diff --git a/svx/source/form/fmshimp.cxx b/svx/source/form/fmshimp.cxx
index 3b5d896cd0a0..8e7278f7e3fe 100644
--- a/svx/source/form/fmshimp.cxx
+++ b/svx/source/form/fmshimp.cxx
@@ -286,11 +286,11 @@ namespace
{
SdrObject* pCurrent = _rMarkList.GetMark( i )->GetMarkedSdrObj();
- std::unique_ptr<SdrObjListIter> pGroupIterator;
+ std::optional<SdrObjListIter> oGroupIterator;
if ( pCurrent->IsGroupObject() )
{
- pGroupIterator.reset(new SdrObjListIter( pCurrent->GetSubList() ));
- pCurrent = pGroupIterator->IsMore() ? pGroupIterator->Next() : nullptr;
+ oGroupIterator.emplace( pCurrent->GetSubList() );
+ pCurrent = oGroupIterator->IsMore() ? oGroupIterator->Next() : nullptr;
}
while ( pCurrent )
@@ -306,7 +306,7 @@ namespace
}
// next element
- pCurrent = pGroupIterator && pGroupIterator->IsMore() ? pGroupIterator->Next() : nullptr;
+ pCurrent = oGroupIterator && oGroupIterator->IsMore() ? oGroupIterator->Next() : nullptr;
}
}
}