loplugin:useuniqueptr in VCLXWindow

Change-Id: Iefec174c7dc3dbd52bdb9f6d7ebe6c8c42c031e9
This commit is contained in:
Noel Grandin 2018-01-15 16:13:27 +02:00
parent 474b4bbff3
commit d72a2899df
2 changed files with 4 additions and 3 deletions

View File

@ -44,6 +44,7 @@
#include <tools/link.hxx>
#include <stdarg.h>
#include <memory>
#include <vector>
#include <functional>
@ -76,7 +77,7 @@ typedef cppu::ImplInheritanceHelper< VCLXDevice,
class TOOLKIT_DLLPUBLIC VCLXWindow : public VCLXWindow_Base
{
private:
VCLXWindowImpl* mpImpl;
std::unique_ptr<VCLXWindowImpl> mpImpl;
UnoPropertyArrayHelper *GetPropHelper();

View File

@ -328,12 +328,12 @@ void ImplInitWindowEvent( css::awt::WindowEvent& rEvent, vcl::Window const * pWi
VCLXWindow::VCLXWindow( bool _bWithDefaultProps )
:mpImpl( nullptr )
{
mpImpl = new VCLXWindowImpl( *this, _bWithDefaultProps );
mpImpl.reset( new VCLXWindowImpl( *this, _bWithDefaultProps ) );
}
VCLXWindow::~VCLXWindow()
{
delete mpImpl;
mpImpl.reset();
if ( GetWindow() )
{