diff options
author | Mike Kaganski <mike.kaganski@collabora.com> | 2019-01-31 10:30:25 +0100 |
---|---|---|
committer | Mike Kaganski <mike.kaganski@collabora.com> | 2019-01-31 12:31:25 +0100 |
commit | b7e89cd6c05360714fe0df5894580f8188538d30 (patch) | |
tree | 361c73db93db60d4619917c638d83f80e6dc8107 /stoc/source | |
parent | 30cc54a4532a732a0cf6dfe9943521978ff7292f (diff) |
const_cast is not needed here
Change-Id: Ifdc1b9006fb325f14ce7623d9a28acc41a067167
Reviewed-on: https://gerrit.libreoffice.org/67193
Tested-by: Jenkins
Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
Diffstat (limited to 'stoc/source')
-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 _ ?! |