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 /sc | |
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 'sc')
-rw-r--r-- | sc/source/ui/docshell/docfunc.cxx | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/sc/source/ui/docshell/docfunc.cxx b/sc/source/ui/docshell/docfunc.cxx index 3e80b6ce5a6e..9c4d8848ffc7 100644 --- a/sc/source/ui/docshell/docfunc.cxx +++ b/sc/source/ui/docshell/docfunc.cxx @@ -1248,9 +1248,9 @@ bool ScDocFunc::SetCellText( { ScDocument& rDoc = rDocShell.GetDocument(); - ::std::unique_ptr<ScExternalRefManager::ApiGuard> pExtRefGuard; + ::std::optional<ScExternalRefManager::ApiGuard> pExtRefGuard; if (bApi) - pExtRefGuard.reset(new ScExternalRefManager::ApiGuard(rDoc)); + pExtRefGuard.emplace(rDoc); ScInputStringType aRes = ScStringUtil::parseInputString(*rDoc.GetFormatTable(), rText, LANGUAGE_ENGLISH_US); |