Kaydet (Commit) 53f21cde authored tarafından Noel Grandin's avatar Noel Grandin

new loplugin: useuniqueptr: embeddedobj

Change-Id: I4c1302061a3607540af7de7a45ba060d3c0b403b
Reviewed-on: https://gerrit.libreoffice.org/33153Tested-by: 's avatarJenkins <ci@libreoffice.org>
Reviewed-by: 's avatarNoel Grandin <noel.grandin@collabora.co.uk>
üst 535f2b2b
...@@ -61,7 +61,6 @@ Interceptor::Interceptor( DocumentHolder* pDocHolder ) ...@@ -61,7 +61,6 @@ Interceptor::Interceptor( DocumentHolder* pDocHolder )
Interceptor::~Interceptor() Interceptor::~Interceptor()
{ {
delete m_pStatCL;
} }
//XDispatch //XDispatch
...@@ -143,8 +142,7 @@ Interceptor::addStatusListener( ...@@ -143,8 +142,7 @@ Interceptor::addStatusListener(
{ {
osl::MutexGuard aGuard(m_aMutex); osl::MutexGuard aGuard(m_aMutex);
if(!m_pStatCL) if(!m_pStatCL)
m_pStatCL = m_pStatCL.reset(new StatusChangeListenerContainer(m_aMutex));
new StatusChangeListenerContainer(m_aMutex);
} }
m_pStatCL->addInterface(URL.Complete,Control); m_pStatCL->addInterface(URL.Complete,Control);
...@@ -168,8 +166,7 @@ Interceptor::addStatusListener( ...@@ -168,8 +166,7 @@ Interceptor::addStatusListener(
{ {
osl::MutexGuard aGuard(m_aMutex); osl::MutexGuard aGuard(m_aMutex);
if(!m_pStatCL) if(!m_pStatCL)
m_pStatCL = m_pStatCL.reset(new StatusChangeListenerContainer(m_aMutex));
new StatusChangeListenerContainer(m_aMutex);
} }
m_pStatCL->addInterface(URL.Complete,Control); m_pStatCL->addInterface(URL.Complete,Control);
...@@ -189,8 +186,7 @@ Interceptor::addStatusListener( ...@@ -189,8 +186,7 @@ Interceptor::addStatusListener(
{ {
osl::MutexGuard aGuard(m_aMutex); osl::MutexGuard aGuard(m_aMutex);
if(!m_pStatCL) if(!m_pStatCL)
m_pStatCL = m_pStatCL.reset(new StatusChangeListenerContainer(m_aMutex));
new StatusChangeListenerContainer(m_aMutex);
} }
m_pStatCL->addInterface(URL.Complete,Control); m_pStatCL->addInterface(URL.Complete,Control);
......
...@@ -26,6 +26,7 @@ ...@@ -26,6 +26,7 @@
#include <com/sun/star/frame/XDispatchProviderInterceptor.hpp> #include <com/sun/star/frame/XDispatchProviderInterceptor.hpp>
#include <com/sun/star/frame/XInterceptorInfo.hpp> #include <com/sun/star/frame/XInterceptorInfo.hpp>
#include <com/sun/star/frame/XDispatch.hpp> #include <com/sun/star/frame/XDispatch.hpp>
#include <memory>
class StatusChangeListenerContainer; class StatusChangeListenerContainer;
...@@ -140,7 +141,7 @@ private: ...@@ -140,7 +141,7 @@ private:
static css::uno::Sequence< OUString > m_aInterceptedURL; static css::uno::Sequence< OUString > m_aInterceptedURL;
StatusChangeListenerContainer* m_pStatCL; std::unique_ptr<StatusChangeListenerContainer> m_pStatCL;
}; };
#endif #endif
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment