From 0a82645c360158f9cc0fdabe2a52f1ff8f981bed Mon Sep 17 00:00:00 2001 From: Noel Grandin Date: Fri, 24 Oct 2014 08:57:19 +0200 Subject: loplugin: cstylecast Change-Id: Ia0f5f0d0efbe4693aba347bff32cd694117251fe --- include/tools/link.hxx | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'include/tools') diff --git a/include/tools/link.hxx b/include/tools/link.hxx index 9b7e7fe6d302..db8028321594 100644 --- a/include/tools/link.hxx +++ b/include/tools/link.hxx @@ -45,32 +45,32 @@ typedef long (*PSTUB)( void*, void* ); #define IMPL_STUB(Class, Method, ArgType) \ long Class::LinkStub##Method( void* pThis, void* pCaller) \ { \ - return ((Class*)pThis )->Method( (ArgType)pCaller ); \ + return static_cast(pThis)->Method( (ArgType)pCaller ); \ } #define IMPL_STATIC_LINK( Class, Method, ArgType, ArgName ) \ long Class::LinkStub##Method( void* pThis, void* pCaller) \ { \ - return Method( (Class*)pThis, (ArgType)pCaller ); \ + return Method( static_cast(pThis), (ArgType)pCaller ); \ } \ long Class::Method( Class* pThis, ArgType ArgName ) #define IMPL_STATIC_LINK_NOINSTANCE( Class, Method, ArgType, ArgName ) \ long Class::LinkStub##Method( void* pThis, void* pCaller) \ { \ - return Method( (Class*)pThis, (ArgType)pCaller ); \ + return Method( static_cast(pThis), (ArgType)pCaller ); \ } \ long Class::Method( SAL_UNUSED_PARAMETER Class*, ArgType ArgName ) #define IMPL_STATIC_LINK_NOINSTANCE_NOARG( Class, Method ) \ long Class::LinkStub##Method( void* pThis, void* pCaller) \ { \ - return Method( (Class*)pThis, pCaller ); \ + return Method( static_cast(pThis), pCaller ); \ } \ long Class::Method( SAL_UNUSED_PARAMETER Class*, SAL_UNUSED_PARAMETER void* ) #define LINK( Inst, Class, Member ) \ - Link( (Class*)Inst, (PSTUB)&Class::LinkStub##Member ) + Link( static_cast(Inst), (PSTUB)&Class::LinkStub##Member ) #define STATIC_LINK( Inst, Class, Member ) LINK(Inst, Class, Member) -- cgit