From c353caee1c86476d98cd483f963f63c4195975f4 Mon Sep 17 00:00:00 2001 From: Noel Grandin Date: Fri, 26 Sep 2014 13:15:08 +0200 Subject: loplugin: cstylecast Change-Id: I53b69a488c70769cbb841db519bc28fd211dc087 --- stoc/source/inspect/introspection.cxx | 8 ++++---- stoc/source/invocation_adapterfactory/iafactory.cxx | 2 +- stoc/source/javavm/javavm.cxx | 2 +- stoc/source/servicemanager/servicemanager.cxx | 2 +- 4 files changed, 7 insertions(+), 7 deletions(-) (limited to 'stoc') 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 xField = (XIdlField*)(aInterfaceSeq1.getConstArray()[ nSequenceIndex ].get()); + Reference xField = static_cast(aInterfaceSeq1.getConstArray()[ nSequenceIndex ].get()); Reference 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 xMethod = (XIdlMethod*)(aInterfaceSeq2.getConstArray()[ nSequenceIndex ].get()); + Reference xMethod = static_cast(aInterfaceSeq2.getConstArray()[ nSequenceIndex ].get()); if( xMethod.is() ) { Sequence args( 1 ); @@ -582,7 +582,7 @@ Any IntrospectionAccessStatic_Impl::getPropertyValueByIndex(const Any& obj, sal_ case MAP_FIELD: { - Reference xField = (XIdlField*)(aInterfaceSeq1.getConstArray()[ nSequenceIndex ].get()); + Reference xField = static_cast(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 xMethod = (XIdlMethod*)(aInterfaceSeq1.getConstArray()[ nSequenceIndex ].get()); + Reference xMethod = static_cast(aInterfaceSeq1.getConstArray()[ nSequenceIndex ].get()); if( xMethod.is() ) { Sequence 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(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(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 x( Reference::query( rName ) ); - return (size_t)x.get(); + return reinterpret_cast(x.get()); } }; -- cgit