loplugin:useuniqueptr: svl (clang-cl)

Change-Id: Id8705c82ab87724b0542acbfe0ad165f889f267a
This commit is contained in:
Stephan Bergmann
2017-07-17 17:24:48 +02:00
parent 143b3a2f3c
commit a1467c8a52
3 changed files with 6 additions and 5 deletions

View File

@@ -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& );

View File

@@ -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()

View File

@@ -77,6 +77,8 @@ void const * DdeData::getData() const
return nullptr;
}
struct DdeImp {};
long DdeConnection::GetError()
{
return 0L;