diff options
author | Noel Grandin <noel.grandin@collabora.co.uk> | 2021-07-21 16:11:40 +0200 |
---|---|---|
committer | Noel Grandin <noel.grandin@collabora.co.uk> | 2021-07-22 08:58:59 +0200 |
commit | 5feb7230bf4a06290d0972dc5bf6dd4108e7edbb (patch) | |
tree | 4988e71b1ee6edfc0dea195ac9c90f62e49cef83 /vcl/source/graphic | |
parent | f8c6d90bc5b344e65cf0ae6cdd028956bb31dbe4 (diff) |
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@collabora.co.uk>
Diffstat (limited to 'vcl/source/graphic')
-rw-r--r-- | vcl/source/graphic/UnoGraphicObject.cxx | 4 |
1 files changed, 2 insertions, 2 deletions
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() |