diff options
author | Noel Grandin <noel.grandin@collabora.co.uk> | 2022-06-01 11:14:19 +0200 |
---|---|---|
committer | Noel Grandin <noel.grandin@collabora.co.uk> | 2022-06-01 18:11:49 +0200 |
commit | 49b9401465730b1151917bffcbc0ad1f0622fcee (patch) | |
tree | d8cfac0b39e42c741ceaefa70779ee1d88251362 /basctl | |
parent | 754eb1541a6ca709f78afbc7fb2b75f626562dcc (diff) |
no need to allocate guards on the heap
Change-Id: I66491a057f082a970158504474b678dbb4decf50
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/135228
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'basctl')
-rw-r--r-- | basctl/source/basicide/basobj2.cxx | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/basctl/source/basicide/basobj2.cxx b/basctl/source/basicide/basobj2.cxx index 28c1acdb383f..8a656bf08d7c 100644 --- a/basctl/source/basicide/basobj2.cxx +++ b/basctl/source/basicide/basobj2.cxx @@ -216,9 +216,9 @@ namespace // in case this is a document-local macro, try to protect the document's Undo Manager from // flawed scripts - std::unique_ptr< ::framework::DocumentUndoGuard > pUndoGuard; + std::optional< ::framework::DocumentUndoGuard > pUndoGuard; if ( pData->aDocument.isDocument() ) - pUndoGuard.reset( new ::framework::DocumentUndoGuard( pData->aDocument.getDocument() ) ); + pUndoGuard.emplace( pData->aDocument.getDocument() ); RunMethod( pData->xMethod.get() ); } |