diff options
author | Noel Grandin <noel.grandin@collabora.co.uk> | 2021-07-21 13:36:49 +0200 |
---|---|---|
committer | Noel Grandin <noel.grandin@collabora.co.uk> | 2021-07-21 19:24:38 +0200 |
commit | 19654ca9de6ff221337e8ec82307611c311c4e57 (patch) | |
tree | f0e9e690822bb767b6891254cf5b4e484956a02a | |
parent | 71a7440c745fc7f16c726571453b6dd7dad2ac80 (diff) |
flatten ImplToolBoxPrivateData
Change-Id: Ia3c0d6624ccf2d3c6189064ab7c8b07dc0734c5b
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/119330
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
-rw-r--r-- | vcl/inc/toolbox.h | 3 | ||||
-rw-r--r-- | vcl/source/window/toolbox2.cxx | 2 |
2 files changed, 3 insertions, 2 deletions
diff --git a/vcl/inc/toolbox.h b/vcl/inc/toolbox.h index 8e00f48f4772..e5b1fe8b647a 100644 --- a/vcl/inc/toolbox.h +++ b/vcl/inc/toolbox.h @@ -23,6 +23,7 @@ #include <vcl/toolbox.hxx> #include <vcl/toolkit/controllayout.hxx> +#include <optional> #include <vector> #define TB_DROPDOWNARROWWIDTH 11 @@ -112,7 +113,7 @@ struct ToolBoxLayoutData : public ControlLayoutData struct ImplToolBoxPrivateData { - std::unique_ptr<vcl::ToolBoxLayoutData> m_pLayoutData; + std::optional<vcl::ToolBoxLayoutData> m_pLayoutData; ToolBox::ImplToolItems m_aItems; ImplToolBoxPrivateData(); diff --git a/vcl/source/window/toolbox2.cxx b/vcl/source/window/toolbox2.cxx index c7c1934270d5..52af143f293d 100644 --- a/vcl/source/window/toolbox2.cxx +++ b/vcl/source/window/toolbox2.cxx @@ -1391,7 +1391,7 @@ void ToolBox::ImplUpdateInputEnable() void ToolBox::ImplFillLayoutData() { - mpData->m_pLayoutData.reset(new ToolBoxLayoutData); + mpData->m_pLayoutData.emplace(); ImplToolItems::size_type nCount = mpData->m_aItems.size(); for( ImplToolItems::size_type i = 0; i < nCount; i++ ) |