[Libreoffice-commits] core.git: stoc/source
Caolán McNamara
caolanm at redhat.com
Sat Feb 20 20:19:27 UTC 2016
stoc/source/inspect/introspection.cxx | 10 +++++-----
1 file changed, 5 insertions(+), 5 deletions(-)
New commits:
commit f92f7efead4d6d419500005a3e14aa2fc20f95ac
Author: Caolán McNamara <caolanm at redhat.com>
Date: Sat Feb 20 20:17:51 2016 +0000
coverity#1353440 Argument cannot be negative
Change-Id: I0576264c006a70a6783e31fb77b380928558cf45
diff --git a/stoc/source/inspect/introspection.cxx b/stoc/source/inspect/introspection.cxx
index 80e742d..67a7095 100644
--- a/stoc/source/inspect/introspection.cxx
+++ b/stoc/source/inspect/introspection.cxx
@@ -335,7 +335,7 @@ sal_Int32 IntrospectionAccessStatic_Impl::getMethodIndex( const OUString& aMetho
// Could be the right method, type has to be checked
iHashResult = (*aIt).second;
- const Reference<XIdlMethod> xMethod = maAllMethodSeq[ iHashResult ];
+ const Reference<XIdlMethod> xMethod = maAllMethodSeq.at(iHashResult);
Reference< XIdlClass > xMethClass = xMethod->getDeclaringClass();
if( xClass->equals( xMethClass ) )
@@ -348,8 +348,8 @@ sal_Int32 IntrospectionAccessStatic_Impl::getMethodIndex( const OUString& aMetho
// Could also be another method with the same name
// Iterate over all methods
- sal_Int32 nLen = (sal_Int32)maAllMethodSeq.size();
- for( int i = 0 ; i < nLen ; ++i )
+ size_t nLen = maAllMethodSeq.size();
+ for (size_t i = 0; i < nLen; ++i)
{
const Reference<XIdlMethod> xMethod2 = maAllMethodSeq[ i ];
if( xMethod2->getName() == aPureMethodName )
@@ -2380,7 +2380,7 @@ css::uno::Reference<css::beans::XIntrospectionAccess> Implementation::inspect(
{
sal_Int32 iHashResult = (*aIt).second;
- Reference<XIdlMethod> xExistingMethod = pAccess->maAllMethodSeq[ iHashResult ];
+ Reference<XIdlMethod> xExistingMethod = pAccess->maAllMethodSeq.at(iHashResult);
Reference< XIdlClass > xExistingMethClass =
xExistingMethod->getDeclaringClass();
@@ -2389,7 +2389,7 @@ css::uno::Reference<css::beans::XIntrospectionAccess> Implementation::inspect(
continue;
}
- pAccess->maAllMethodSeq[ iAllExportedMethod ] = rxMethod;
+ pAccess->maAllMethodSeq.at(iAllExportedMethod) = rxMethod;
// If a concept has been set, is the method "normal"?
sal_Int32& rMethodConcept_i = pLocalMethodConcepts[ i ];
More information about the Libreoffice-commits
mailing list