summaryrefslogtreecommitdiff
path: root/stoc
diff options
context:
space:
mode:
authorTor Lillqvist <tlillqvist@suse.com>2011-10-03 16:28:21 +0300
committerTor Lillqvist <tlillqvist@suse.com>2011-10-03 16:28:44 +0300
commit9e6d06a871b366cc72f9a23ab45080b66a47f144 (patch)
tree82aa2ed9335c8a138c60e724a2c297e79b7a418e /stoc
parentd83eab64076aed534f481960ff3a18962633c297 (diff)
WaE: unreachable code, also add comment pondering what the code means
Diffstat (limited to 'stoc')
-rw-r--r--stoc/source/inspect/introspection.cxx9
1 files changed, 8 insertions, 1 deletions
diff --git a/stoc/source/inspect/introspection.cxx b/stoc/source/inspect/introspection.cxx
index 889179cab375..36f1acce8e02 100644
--- a/stoc/source/inspect/introspection.cxx
+++ b/stoc/source/inspect/introspection.cxx
@@ -112,7 +112,14 @@ sal_Bool isDerivedFrom( Reference<XIdlClass> xToTestClass, Reference<XIdlClass>
const Reference<XIdlClass>* pClassesArray = aClassesSeq.getConstArray();
sal_Int32 nSuperClassCount = aClassesSeq.getLength();
sal_Int32 i;
- for( i = 0 ; i < nSuperClassCount ; i++ )
+ for( i = 0 ;
+ i < nSuperClassCount ;
+ /* No "increment" expression needed as the body always
+ * returns, and in fact MSVC warns about unreachable code if
+ * we include one. On the other hand, what's the point in
+ * using a for loop here then if all we ever will look at is
+ * pClassesArray[0] ?
+ */ )
{
const Reference<XIdlClass>& rxClass = pClassesArray[i];
if( xDerivedFromClass->equals( rxClass ) )