diff options
author | Stephan Bergmann <sbergman@redhat.com> | 2017-07-17 17:24:48 +0200 |
---|---|---|
committer | Stephan Bergmann <sbergman@redhat.com> | 2017-07-17 17:24:48 +0200 |
commit | a1467c8a526d7dda6e51d2af6a15f274feed30a1 (patch) | |
tree | 5e6ce2e10a6390803564187c298cdf8e0fde197f | |
parent | loplugin:useuniqueptr: shell (clang-cl) (diff) | |
download | core-a1467c8a526d7dda6e51d2af6a15f274feed30a1.tar.gz core-a1467c8a526d7dda6e51d2af6a15f274feed30a1.zip |
loplugin:useuniqueptr: svl (clang-cl)
Change-Id: Id8705c82ab87724b0542acbfe0ad165f889f267a
-rw-r--r-- | include/svl/svdde.hxx | 2 | ||||
-rw-r--r-- | svl/source/svdde/ddecli.cxx | 7 | ||||
-rw-r--r-- | svl/unx/source/svdde/ddedummy.cxx | 2 |
3 files changed, 6 insertions, 5 deletions
diff --git a/include/svl/svdde.hxx b/include/svl/svdde.hxx index d90dbed606e7..2415ad8e03ba 100644 --- a/include/svl/svdde.hxx +++ b/include/svl/svdde.hxx @@ -180,7 +180,7 @@ class SVL_DLLPUBLIC DdeConnection std::vector<DdeTransaction*> aTransactions; DdeString* pService; DdeString* pTopic; - DdeImp* pImp; + std::unique_ptr<DdeImp> pImp; public: DdeConnection( SAL_UNUSED_PARAMETER const OUString&, SAL_UNUSED_PARAMETER const OUString& ); diff --git a/svl/source/svdde/ddecli.cxx b/svl/source/svdde/ddecli.cxx index 5707b0c40878..d97a9cdf4fe6 100644 --- a/svl/source/svdde/ddecli.cxx +++ b/svl/source/svdde/ddecli.cxx @@ -23,7 +23,7 @@ #include <algorithm> #include "ddeimp.hxx" #include <svl/svdde.hxx> - +#include <o3tl/make_unique.hxx> #include <osl/thread.h> #include <comphelper/solarmutex.hxx> @@ -144,9 +144,9 @@ HDDEDATA CALLBACK DdeInternal::CliCallback( UINT nCode, UINT nCbType, return nRet; } -DdeConnection::DdeConnection( const OUString& rService, const OUString& rTopic ) +DdeConnection::DdeConnection( const OUString& rService, const OUString& rTopic ): + pImp(o3tl::make_unique<DdeImp>()) { - pImp = new DdeImp; pImp->nStatus = DMLERR_NO_ERROR; pImp->hConv = nullptr; @@ -206,7 +206,6 @@ DdeConnection::~DdeConnection() ImpDeinitInstData(); } } - delete pImp; } bool DdeConnection::IsConnected() diff --git a/svl/unx/source/svdde/ddedummy.cxx b/svl/unx/source/svdde/ddedummy.cxx index 7f032ef20446..856d79dc5db2 100644 --- a/svl/unx/source/svdde/ddedummy.cxx +++ b/svl/unx/source/svdde/ddedummy.cxx @@ -77,6 +77,8 @@ void const * DdeData::getData() const return nullptr; } +struct DdeImp {}; + long DdeConnection::GetError() { return 0L; |