From b9c46a57c16116ea4beef59abf0fd11b7d6d97a3 Mon Sep 17 00:00:00 2001 From: Noel Grandin Date: Mon, 23 Apr 2018 15:32:29 +0200 Subject: loplugin:useuniqueptr in SalDisplay Change-Id: I33cab261f107ed29e36d0093a87ffc3a2de21a54 Reviewed-on: https://gerrit.libreoffice.org/53361 Tested-by: Jenkins Reviewed-by: Noel Grandin --- vcl/inc/unx/saldisp.hxx | 4 ++-- vcl/inc/unx/wmadaptor.hxx | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) (limited to 'vcl/inc/unx') diff --git a/vcl/inc/unx/saldisp.hxx b/vcl/inc/unx/saldisp.hxx index 48756f3cbfe1..a53be3692d8b 100644 --- a/vcl/inc/unx/saldisp.hxx +++ b/vcl/inc/unx/saldisp.hxx @@ -280,7 +280,7 @@ protected: KeySym nCtrlKeySym_; // first control modifier KeySym nMod1KeySym_; // first mod1 modifier - vcl_sal::WMAdaptor* m_pWMAdaptor; + std::unique_ptr m_pWMAdaptor; bool m_bXinerama; std::vector< tools::Rectangle > m_aXineramaScreens; @@ -367,7 +367,7 @@ public: SalI18N_KeyboardExtension* GetKbdExtension() const { return mpKbdExtension; } void SetKbdExtension(SalI18N_KeyboardExtension *pKbdExtension) { mpKbdExtension = pKbdExtension; } - ::vcl_sal::WMAdaptor* getWMAdaptor() const { return m_pWMAdaptor; } + ::vcl_sal::WMAdaptor* getWMAdaptor() const { return m_pWMAdaptor.get(); } bool IsXinerama() const { return m_bXinerama; } const std::vector< tools::Rectangle >& GetXineramaScreens() const { return m_aXineramaScreens; } ::Window GetRootWindow( SalX11Screen nXScreen ) const diff --git a/vcl/inc/unx/wmadaptor.hxx b/vcl/inc/unx/wmadaptor.hxx index 6f7f4caaa85c..ff76cf638987 100644 --- a/vcl/inc/unx/wmadaptor.hxx +++ b/vcl/inc/unx/wmadaptor.hxx @@ -160,7 +160,7 @@ public: /* * creates a valid WMAdaptor instance for the SalDisplay */ - static WMAdaptor* createWMAdaptor( SalDisplay* ); + static std::unique_ptr createWMAdaptor( SalDisplay* ); /* * may return an empty string if the window manager could -- cgit