diff options
author | Caolán McNamara <caolanm@redhat.com> | 2016-02-20 20:17:51 +0000 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2016-02-20 20:19:02 +0000 |
commit | f92f7efead4d6d419500005a3e14aa2fc20f95ac (patch) | |
tree | 7c8cd341127e7e0ac985af796edc241ec0fb246a /stoc | |
parent | 49d289475167ab21682bc8dbf26a7f67d5902ded (diff) |
coverity#1353440 Argument cannot be negative
Change-Id: I0576264c006a70a6783e31fb77b380928558cf45
Diffstat (limited to 'stoc')
-rw-r--r-- | stoc/source/inspect/introspection.cxx | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/stoc/source/inspect/introspection.cxx b/stoc/source/inspect/introspection.cxx index 80e742d463e6..67a709599bc7 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 ]; |