diff options
author | Noel Grandin <noelgrandin@gmail.com> | 2021-09-24 13:41:24 +0200 |
---|---|---|
committer | Noel Grandin <noel.grandin@collabora.co.uk> | 2021-09-24 18:58:16 +0200 |
commit | e8edc8edbf820d8358b465b92e697eb6831d23de (patch) | |
tree | 3095d1b490fbbd479dff18d974f6517fe7146e84 /sw/source/filter/ascii/parasc.cxx | |
parent | fb7d05f3d56c3e21ed7ba5cf8723a02801640caa (diff) |
no need to allocate these SwPaM on the heap
Change-Id: Ief142e6410599ea50aee4065d843d7eaea55e21c
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/122578
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'sw/source/filter/ascii/parasc.cxx')
-rw-r--r-- | sw/source/filter/ascii/parasc.cxx | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/sw/source/filter/ascii/parasc.cxx b/sw/source/filter/ascii/parasc.cxx index e57a03557637..c2312effadcc 100644 --- a/sw/source/filter/ascii/parasc.cxx +++ b/sw/source/filter/ascii/parasc.cxx @@ -155,12 +155,12 @@ ErrCode SwASCIIParser::CallParser() ::StartProgress(STR_STATSTR_W4WREAD, 0, m_nFileSize, m_rDoc.GetDocShell()); - std::unique_ptr<SwPaM> pInsPam; + std::optional<SwPaM> pInsPam; sal_Int32 nSttContent = 0; if (!m_bNewDoc) { const SwNodeIndex& rTmp = m_pPam->GetPoint()->nNode; - pInsPam.reset(new SwPaM( rTmp, rTmp, 0, -1 )); + pInsPam.emplace( rTmp, rTmp, 0, -1 ); nSttContent = m_pPam->GetPoint()->nContent.GetIndex(); } |