diff options
author | Noel Grandin <noel@peralex.com> | 2014-09-26 13:15:08 +0200 |
---|---|---|
committer | Noel Grandin <noel@peralex.com> | 2014-09-29 12:50:35 +0200 |
commit | c353caee1c86476d98cd483f963f63c4195975f4 (patch) | |
tree | 861ed6bf7d859115980928658a07469699020443 /stoc | |
parent | 07ca074e425ea381b9de1e7298be11678d3f6b38 (diff) |
loplugin: cstylecast
Change-Id: I53b69a488c70769cbb841db519bc28fd211dc087
Diffstat (limited to 'stoc')
-rw-r--r-- | stoc/source/inspect/introspection.cxx | 8 | ||||
-rw-r--r-- | stoc/source/invocation_adapterfactory/iafactory.cxx | 2 | ||||
-rw-r--r-- | stoc/source/javavm/javavm.cxx | 2 | ||||
-rw-r--r-- | stoc/source/servicemanager/servicemanager.cxx | 2 |
4 files changed, 7 insertions, 7 deletions
diff --git a/stoc/source/inspect/introspection.cxx b/stoc/source/inspect/introspection.cxx index 2051b08124f8..bd7619768228 100644 --- a/stoc/source/inspect/introspection.cxx +++ b/stoc/source/inspect/introspection.cxx @@ -466,7 +466,7 @@ void IntrospectionAccessStatic_Impl::setPropertyValueByIndex(const Any& obj, sal case MAP_FIELD: { - Reference<XIdlField> xField = (XIdlField*)(aInterfaceSeq1.getConstArray()[ nSequenceIndex ].get()); + Reference<XIdlField> xField = static_cast<XIdlField*>(aInterfaceSeq1.getConstArray()[ nSequenceIndex ].get()); Reference<XIdlField2> xField2(xField, UNO_QUERY); if( xField2.is() ) { @@ -491,7 +491,7 @@ void IntrospectionAccessStatic_Impl::setPropertyValueByIndex(const Any& obj, sal case MAP_SETONLY: { // Retrieve set-Methods - Reference<XIdlMethod> xMethod = (XIdlMethod*)(aInterfaceSeq2.getConstArray()[ nSequenceIndex ].get()); + Reference<XIdlMethod> xMethod = static_cast<XIdlMethod*>(aInterfaceSeq2.getConstArray()[ nSequenceIndex ].get()); if( xMethod.is() ) { Sequence<Any> args( 1 ); @@ -582,7 +582,7 @@ Any IntrospectionAccessStatic_Impl::getPropertyValueByIndex(const Any& obj, sal_ case MAP_FIELD: { - Reference<XIdlField> xField = (XIdlField*)(aInterfaceSeq1.getConstArray()[ nSequenceIndex ].get()); + Reference<XIdlField> xField = static_cast<XIdlField*>(aInterfaceSeq1.getConstArray()[ nSequenceIndex ].get()); if( xField.is() ) { aRet = xField->get( obj ); @@ -600,7 +600,7 @@ Any IntrospectionAccessStatic_Impl::getPropertyValueByIndex(const Any& obj, sal_ case MAP_GETSET: { // get-Methode holen - Reference<XIdlMethod> xMethod = (XIdlMethod*)(aInterfaceSeq1.getConstArray()[ nSequenceIndex ].get()); + Reference<XIdlMethod> xMethod = static_cast<XIdlMethod*>(aInterfaceSeq1.getConstArray()[ nSequenceIndex ].get()); if( xMethod.is() ) { Sequence<Any> args; diff --git a/stoc/source/invocation_adapterfactory/iafactory.cxx b/stoc/source/invocation_adapterfactory/iafactory.cxx index 99fd73d1466c..8cd68ce79f4c 100644 --- a/stoc/source/invocation_adapterfactory/iafactory.cxx +++ b/stoc/source/invocation_adapterfactory/iafactory.cxx @@ -77,7 +77,7 @@ static OUString invadp_getImplementationName() struct hash_ptr { inline size_t operator() ( void * p ) const - { return (size_t)p; } + { return reinterpret_cast<size_t>(p); } }; typedef boost::unordered_set< void *, hash_ptr, equal_to< void * > > t_ptr_set; typedef boost::unordered_map< void *, t_ptr_set, hash_ptr, equal_to< void * > > t_ptr_map; diff --git a/stoc/source/javavm/javavm.cxx b/stoc/source/javavm/javavm.cxx index bb0bd3590ec2..6e9c8fdba87b 100644 --- a/stoc/source/javavm/javavm.cxx +++ b/stoc/source/javavm/javavm.cxx @@ -1245,7 +1245,7 @@ void SAL_CALL JavaVirtualMachine::elementReplaced( if(pJNIEnv->ExceptionOccurred()) throw css::uno::RuntimeException("JNI:FindClass java.lang.Class", 0); jmethodID jmName= pJNIEnv->GetMethodID( jcClass,"getName","()Ljava/lang/String;"); if(pJNIEnv->ExceptionOccurred()) throw css::uno::RuntimeException("JNI:GetMethodID java.lang.Class.getName", 0); - jstring jsClass= (jstring) pJNIEnv->CallObjectMethod( jcSec, jmName); + jstring jsClass= static_cast<jstring>(pJNIEnv->CallObjectMethod( jcSec, jmName)); const jchar* jcharName= pJNIEnv->GetStringChars( jsClass, NULL); OUString sName( jcharName); jboolean bIsSandbox; diff --git a/stoc/source/servicemanager/servicemanager.cxx b/stoc/source/servicemanager/servicemanager.cxx index 45d64e13a20b..ca2ab6aa51c3 100644 --- a/stoc/source/servicemanager/servicemanager.cxx +++ b/stoc/source/servicemanager/servicemanager.cxx @@ -132,7 +132,7 @@ struct hashRef_Impl { // query to XInterface. The cast to XInterface* must be the same for the same object Reference<XInterface > x( Reference<XInterface >::query( rName ) ); - return (size_t)x.get(); + return reinterpret_cast<size_t>(x.get()); } }; |