[Libreoffice-commits] core.git: include/svtools svtools/source
Xisco Fauli
anistenis at gmail.com
Wed Jun 1 06:49:10 UTC 2016
include/svtools/toolbarmenu.hxx | 2 +-
svtools/source/control/toolbarmenu.cxx | 6 +++---
2 files changed, 4 insertions(+), 4 deletions(-)
New commits:
commit 3aaa90c36c2910847576bd9362276b0e9b5acca4
Author: Xisco Fauli <anistenis at gmail.com>
Date: Thu May 26 01:48:15 2016 +0200
tdf#89329: use unique_ptr for pImpl in toolbarmenu
Change-Id: I2adafe082bd83edc31777f11f66313a51fde7d81
Reviewed-on: https://gerrit.libreoffice.org/25478
Tested-by: Jenkins <ci at libreoffice.org>
Reviewed-by: Noel Grandin <noelgrandin at gmail.com>
diff --git a/include/svtools/toolbarmenu.hxx b/include/svtools/toolbarmenu.hxx
index a5f06e7..ac38dbd 100644
--- a/include/svtools/toolbarmenu.hxx
+++ b/include/svtools/toolbarmenu.hxx
@@ -129,7 +129,7 @@ private:
ToolbarMenuEntry* implGetEntry( int nEntry ) const;
ToolbarMenuEntry* implSearchEntry( int nEntryId ) const;
- ToolbarMenu_Impl* mpImpl;
+ std::unique_ptr<ToolbarMenu_Impl> mpImpl;
};
} // namespace svtools
diff --git a/svtools/source/control/toolbarmenu.cxx b/svtools/source/control/toolbarmenu.cxx
index c846ef0..71accc7 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();
More information about the Libreoffice-commits
mailing list