Kaydet (Commit) b7e89cd6 authored tarafından Mike Kaganski's avatar Mike Kaganski

const_cast is not needed here

Change-Id: Ifdc1b9006fb325f14ce7623d9a28acc41a067167
Reviewed-on: https://gerrit.libreoffice.org/67193
Tested-by: Jenkins
Reviewed-by: 's avatarMike Kaganski <mike.kaganski@collabora.com>
üst 30cc54a4
......@@ -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 _ ?!
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment