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>
This commit is contained in:
@@ -287,9 +287,8 @@ IntrospectionAccessStatic_Impl::IntrospectionAccessStatic_Impl( Reference< XIdlR
|
|||||||
|
|
||||||
sal_Int32 IntrospectionAccessStatic_Impl::getPropertyIndex( const OUString& aPropertyName ) const
|
sal_Int32 IntrospectionAccessStatic_Impl::getPropertyIndex( const OUString& aPropertyName ) const
|
||||||
{
|
{
|
||||||
IntrospectionAccessStatic_Impl* pThis = const_cast<IntrospectionAccessStatic_Impl*>(this);
|
auto aIt = maPropertyNameMap.find(aPropertyName);
|
||||||
IntrospectionNameMap::iterator aIt = pThis->maPropertyNameMap.find( aPropertyName );
|
if (aIt != maPropertyNameMap.end())
|
||||||
if (aIt != pThis->maPropertyNameMap.end())
|
|
||||||
return aIt->second;
|
return aIt->second;
|
||||||
|
|
||||||
return -1;
|
return -1;
|
||||||
@@ -297,9 +296,8 @@ sal_Int32 IntrospectionAccessStatic_Impl::getPropertyIndex( const OUString& aPro
|
|||||||
|
|
||||||
sal_Int32 IntrospectionAccessStatic_Impl::getMethodIndex( const OUString& aMethodName ) const
|
sal_Int32 IntrospectionAccessStatic_Impl::getMethodIndex( const OUString& aMethodName ) const
|
||||||
{
|
{
|
||||||
IntrospectionAccessStatic_Impl* pThis = const_cast<IntrospectionAccessStatic_Impl*>(this);
|
auto aIt = maMethodNameMap.find(aMethodName);
|
||||||
IntrospectionNameMap::iterator aIt = pThis->maMethodNameMap.find( aMethodName );
|
if (aIt != maMethodNameMap.end())
|
||||||
if (aIt != pThis->maMethodNameMap.end())
|
|
||||||
{
|
{
|
||||||
return aIt->second;
|
return aIt->second;
|
||||||
}
|
}
|
||||||
@@ -315,8 +313,8 @@ sal_Int32 IntrospectionAccessStatic_Impl::getMethodIndex( const OUString& aMetho
|
|||||||
|
|
||||||
OUString aPureMethodName = aMethodName.copy( nFound + 1 );
|
OUString aPureMethodName = aMethodName.copy( nFound + 1 );
|
||||||
|
|
||||||
aIt = pThis->maMethodNameMap.find( aPureMethodName );
|
aIt = maMethodNameMap.find( aPureMethodName );
|
||||||
if (aIt != pThis->maMethodNameMap.end())
|
if (aIt != maMethodNameMap.end())
|
||||||
{
|
{
|
||||||
// Check if it can be a type?
|
// Check if it can be a type?
|
||||||
// Problem: Does not work if package names contain _ ?!
|
// Problem: Does not work if package names contain _ ?!
|
||||||
|
Reference in New Issue
Block a user