summaryrefslogtreecommitdiff
path: root/cppu/source
diff options
context:
space:
mode:
authorNoel Grandin <noel@peralex.com>2014-09-11 15:25:48 +0200
committerNoel Grandin <noel@peralex.com>2014-09-17 07:08:23 +0200
commit9685276b975aa37d16ba81dd8294b5717e3823df (patch)
tree58a0b916218bf99ea5b0c6c77d3c913f317b512a /cppu/source
parenta0a5f7695388627246d30701afdbd68ed812ddc9 (diff)
cppu and cppuhelper: loplugin: cstylecast
Add a macro in include/cppuhelper/implbase_ex.hxx to make initialising the type_entry classes a little less verbose. Change-Id: I0904b5b9db269c92bc89e7ce3d6c8b09350c9897
Diffstat (limited to 'cppu/source')
-rw-r--r--cppu/source/threadpool/threadpool.cxx2
-rw-r--r--cppu/source/typelib/static_types.cxx2
-rw-r--r--cppu/source/typelib/typelib.cxx2
-rw-r--r--cppu/source/uno/destr.hxx2
-rw-r--r--cppu/source/uno/lbenv.cxx2
-rw-r--r--cppu/source/uno/lbmap.cxx2
-rw-r--r--cppu/source/uno/prim.hxx2
7 files changed, 7 insertions, 7 deletions
diff --git a/cppu/source/threadpool/threadpool.cxx b/cppu/source/threadpool/threadpool.cxx
index b0e64ff8cd6a..c54b539877f4 100644
--- a/cppu/source/threadpool/threadpool.cxx
+++ b/cppu/source/threadpool/threadpool.cxx
@@ -381,7 +381,7 @@ struct uno_ThreadPool_Hash
{
sal_Size operator () ( const uno_ThreadPool &a ) const
{
- return (sal_Size) a;
+ return reinterpret_cast<sal_Size>( a );
}
};
diff --git a/cppu/source/typelib/static_types.cxx b/cppu/source/typelib/static_types.cxx
index 3886745712fb..82640a014f54 100644
--- a/cppu/source/typelib/static_types.cxx
+++ b/cppu/source/typelib/static_types.cxx
@@ -70,7 +70,7 @@ struct AlignSize_Impl
#endif
// the value of the maximal alignment
-static sal_Int32 nMaxAlignment = (sal_Int32)( (sal_Size)(&((AlignSize_Impl *) 16)->dDouble) - 16);
+static sal_Int32 nMaxAlignment = (sal_Int32)( reinterpret_cast<sal_Size>(&(reinterpret_cast<AlignSize_Impl *>(16))->dDouble) - 16);
static inline sal_Int32 adjustAlignment( sal_Int32 nRequestedAlignment )
{
diff --git a/cppu/source/typelib/typelib.cxx b/cppu/source/typelib/typelib.cxx
index 7a6ec94227bb..09fa10f17f88 100644
--- a/cppu/source/typelib/typelib.cxx
+++ b/cppu/source/typelib/typelib.cxx
@@ -79,7 +79,7 @@ struct AlignSize_Impl
#endif
// the value of the maximal alignment
-static sal_Int32 nMaxAlignment = (sal_Int32)( (sal_Size)(&((AlignSize_Impl *) 16)->dDouble) - 16);
+static sal_Int32 nMaxAlignment = (sal_Int32)( reinterpret_cast<sal_Size>(&(reinterpret_cast<AlignSize_Impl *>(16))->dDouble) - 16);
static inline sal_Int32 adjustAlignment( sal_Int32 nRequestedAlignment )
{
diff --git a/cppu/source/uno/destr.hxx b/cppu/source/uno/destr.hxx
index 46a71c27a9f7..9cce1c692c5d 100644
--- a/cppu/source/uno/destr.hxx
+++ b/cppu/source/uno/destr.hxx
@@ -129,7 +129,7 @@ inline void _destructAny(
break;
}
#if OSL_DEBUG_LEVEL > 0
- pAny->pData = (void *)0xdeadbeef;
+ pAny->pData = reinterpret_cast<void *>(0xdeadbeef);
#endif
::typelib_typedescriptionreference_release( pType );
diff --git a/cppu/source/uno/lbenv.cxx b/cppu/source/uno/lbenv.cxx
index c38a9b7a2eb0..5adecc3ce2c0 100644
--- a/cppu/source/uno/lbenv.cxx
+++ b/cppu/source/uno/lbenv.cxx
@@ -98,7 +98,7 @@ struct FctPtrHash :
public ::std::unary_function< const void *, ::std::size_t >
{
::std::size_t operator () ( const void * pKey ) const
- { return (::std::size_t) pKey; }
+ { return reinterpret_cast<::std::size_t>( pKey ); }
};
diff --git a/cppu/source/uno/lbmap.cxx b/cppu/source/uno/lbmap.cxx
index 162f438ceebe..7c0d76552efc 100644
--- a/cppu/source/uno/lbmap.cxx
+++ b/cppu/source/uno/lbmap.cxx
@@ -129,7 +129,7 @@ struct FctOUStringHash : public std::unary_function< const OUString &, size_t >
struct FctPtrHash : public std::unary_function< uno_Mapping *, size_t >
{
size_t operator()( uno_Mapping * pKey ) const
- { return (size_t)pKey; }
+ { return reinterpret_cast<size_t>(pKey); }
};
typedef boost::unordered_map<
diff --git a/cppu/source/uno/prim.hxx b/cppu/source/uno/prim.hxx
index 265e2cdab2e7..545f239ecaa2 100644
--- a/cppu/source/uno/prim.hxx
+++ b/cppu/source/uno/prim.hxx
@@ -134,7 +134,7 @@ inline typelib_TypeDescriptionReference * _getVoidType()
#if OSL_DEBUG_LEVEL > 0
#define CONSTRUCT_EMPTY_ANY( pAny ) \
(pAny)->pType = _getVoidType(); \
-(pAny)->pData = (void *)0xdeadbeef;
+(pAny)->pData = reinterpret_cast<void *>(0xdeadbeef);
#else
#define CONSTRUCT_EMPTY_ANY( pAny ) \
(pAny)->pType = _getVoidType(); \