[Libreoffice-commits] core.git: vcl/source

Noel Grandin (via logerrit) logerrit at kemper.freedesktop.org
Thu Jul 22 06:59:36 UTC 2021


 vcl/source/graphic/UnoGraphicObject.cxx |    4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

New commits:
commit 5feb7230bf4a06290d0972dc5bf6dd4108e7edbb
Author:     Noel Grandin <noel.grandin at collabora.co.uk>
AuthorDate: Wed Jul 21 16:11:40 2021 +0200
Commit:     Noel Grandin <noel.grandin at collabora.co.uk>
CommitDate: Thu Jul 22 08:58:59 2021 +0200

    flatten GraphicObjectImpl
    
    no need to allocate the GraphicObject separately
    
    Change-Id: I71f13792dfd45e47d835ad1e3627a559044346a1
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/119337
    Tested-by: Jenkins
    Reviewed-by: Noel Grandin <noel.grandin at collabora.co.uk>

diff --git a/vcl/source/graphic/UnoGraphicObject.cxx b/vcl/source/graphic/UnoGraphicObject.cxx
index 6a627bece94d..69cbd6daa048 100644
--- a/vcl/source/graphic/UnoGraphicObject.cxx
+++ b/vcl/source/graphic/UnoGraphicObject.cxx
@@ -38,7 +38,7 @@ typedef ::cppu::WeakImplHelper<graphic::XGraphicObject, css::lang::XServiceInfo>
 class GraphicObjectImpl : public GraphicObject_BASE
 {
      std::mutex m_aMutex;
-     std::unique_ptr<GraphicObject> mpGraphicObject;
+     std::optional<GraphicObject> mpGraphicObject;
 
 public:
     /// @throws uno::RuntimeException
@@ -66,7 +66,7 @@ public:
 
 GraphicObjectImpl::GraphicObjectImpl(const uno::Sequence<uno::Any>& /*rArgs*/)
 {
-    mpGraphicObject.reset(new GraphicObject());
+    mpGraphicObject.emplace();
 }
 
 uno::Reference<graphic::XGraphic> SAL_CALL GraphicObjectImpl::getGraphic()


More information about the Libreoffice-commits mailing list