summaryrefslogtreecommitdiff
path: root/svtools
diff options
context:
space:
mode:
authorXisco Fauli <anistenis@gmail.com>2016-05-26 01:48:15 +0200
committerNoel Grandin <noelgrandin@gmail.com>2016-06-01 06:48:31 +0000
commit3aaa90c36c2910847576bd9362276b0e9b5acca4 (patch)
treecb4338f7870b8b49b3f3128f9e14c4ea511203ba /svtools
parentfa135fd0e05fc4ba784b4349d65f2e5ed26c0f55 (diff)
tdf#89329: use unique_ptr for pImpl in toolbarmenu
Change-Id: I2adafe082bd83edc31777f11f66313a51fde7d81 Reviewed-on: https://gerrit.libreoffice.org/25478 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noelgrandin@gmail.com>
Diffstat (limited to 'svtools')
-rw-r--r--svtools/source/control/toolbarmenu.cxx6
1 files changed, 3 insertions, 3 deletions
diff --git a/svtools/source/control/toolbarmenu.cxx b/svtools/source/control/toolbarmenu.cxx
index c846ef0a99eb..71accc7b6a8d 100644
--- a/svtools/source/control/toolbarmenu.cxx
+++ b/svtools/source/control/toolbarmenu.cxx
@@ -411,7 +411,7 @@ ToolbarMenu::ToolbarMenu( const Reference< XFrame >& rFrame, vcl::Window* pParen
void ToolbarMenu::implInit(const Reference< XFrame >& rFrame)
{
- mpImpl = new ToolbarMenu_Impl( *this, rFrame );
+ mpImpl.reset( new ToolbarMenu_Impl( *this, rFrame ) );
const StyleSettings& rStyleSettings = GetSettings().GetStyleSettings();
SetControlBackground( rStyleSettings.GetMenuColor() );
@@ -443,8 +443,8 @@ void ToolbarMenu::dispose()
mpImpl->mxAccessible.clear();
- std::unique_ptr<ToolbarMenu_Impl> pImpl{mpImpl};
- mpImpl = nullptr;
+ std::unique_ptr<ToolbarMenu_Impl> pImpl = std::move(pImpl);
+ mpImpl.reset();
pImpl->maEntryVector.clear();