diff options
author | Noel Grandin <noel.grandin@collabora.co.uk> | 2023-03-02 09:10:22 +0200 |
---|---|---|
committer | Noel Grandin <noel.grandin@collabora.co.uk> | 2023-03-02 08:56:38 +0000 |
commit | 9b68315b5e76423e2206f3306596f8cf6e4c16a4 (patch) | |
tree | a4eb3adb47a1045d0bdc3bfdca99da70fc89cc00 /xmloff/source | |
parent | 4547cc9428649af54480d4471154bd44c8480f5c (diff) |
allocate DocumentInfo inline
it is only one word big
Change-Id: I8b5fec4f44fcdeb2c22c00db2323e7427b11d209
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/148084
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'xmloff/source')
-rw-r--r-- | xmloff/source/core/xmlimp.cxx | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/xmloff/source/core/xmlimp.cxx b/xmloff/source/core/xmlimp.cxx index 3b6d79934a99..fd2ace1c6bd2 100644 --- a/xmloff/source/core/xmlimp.cxx +++ b/xmloff/source/core/xmlimp.cxx @@ -312,7 +312,7 @@ public: std::unique_ptr< xmloff::RDFaImportHelper > mpRDFaHelper; - std::unique_ptr< DocumentInfo > mpDocumentInfo; + std::optional< DocumentInfo > moDocumentInfo; SvXMLImport_Impl( uno::Reference< uno::XComponentContext > xContext, OUString theImplementationName, @@ -337,12 +337,12 @@ public: sal_uInt16 getGeneratorVersion( const SvXMLImport& rImport ) { - if (!mpDocumentInfo) + if (!moDocumentInfo) { - mpDocumentInfo.reset( new DocumentInfo( rImport ) ); + moDocumentInfo.emplace( rImport ); } - return mpDocumentInfo->getGeneratorVersion(); + return moDocumentInfo->getGeneratorVersion(); } ::comphelper::UnoInterfaceToUniqueIdentifierMapper maInterfaceToIdentifierMapper; |