diff options
-rw-r--r-- | stoc/source/inspect/introspection.cxx | 14 |
1 files changed, 6 insertions, 8 deletions
diff --git a/stoc/source/inspect/introspection.cxx b/stoc/source/inspect/introspection.cxx index 53e045c6dc2b..faa23511d4d4 100644 --- a/stoc/source/inspect/introspection.cxx +++ b/stoc/source/inspect/introspection.cxx @@ -287,9 +287,8 @@ IntrospectionAccessStatic_Impl::IntrospectionAccessStatic_Impl( Reference< XIdlR sal_Int32 IntrospectionAccessStatic_Impl::getPropertyIndex( const OUString& aPropertyName ) const { - IntrospectionAccessStatic_Impl* pThis = const_cast<IntrospectionAccessStatic_Impl*>(this); - IntrospectionNameMap::iterator aIt = pThis->maPropertyNameMap.find( aPropertyName ); - if (aIt != pThis->maPropertyNameMap.end()) + auto aIt = maPropertyNameMap.find(aPropertyName); + if (aIt != maPropertyNameMap.end()) return aIt->second; return -1; @@ -297,9 +296,8 @@ sal_Int32 IntrospectionAccessStatic_Impl::getPropertyIndex( const OUString& aPro sal_Int32 IntrospectionAccessStatic_Impl::getMethodIndex( const OUString& aMethodName ) const { - IntrospectionAccessStatic_Impl* pThis = const_cast<IntrospectionAccessStatic_Impl*>(this); - IntrospectionNameMap::iterator aIt = pThis->maMethodNameMap.find( aMethodName ); - if (aIt != pThis->maMethodNameMap.end()) + auto aIt = maMethodNameMap.find(aMethodName); + if (aIt != maMethodNameMap.end()) { return aIt->second; } @@ -315,8 +313,8 @@ sal_Int32 IntrospectionAccessStatic_Impl::getMethodIndex( const OUString& aMetho OUString aPureMethodName = aMethodName.copy( nFound + 1 ); - aIt = pThis->maMethodNameMap.find( aPureMethodName ); - if (aIt != pThis->maMethodNameMap.end()) + aIt = maMethodNameMap.find( aPureMethodName ); + if (aIt != maMethodNameMap.end()) { // Check if it can be a type? // Problem: Does not work if package names contain _ ?! |