1
0
Fork 0
mirror of https://github.com/eclipse-cdt/cdt synced 2025-07-01 06:05:24 +02:00

Removed two redundant checks flagged by the compiler.

This commit is contained in:
Sergey Prigogin 2008-03-29 17:05:58 +00:00
parent fa7e6e8363
commit 56cf847c2a

View file

@ -784,19 +784,20 @@ public class CPPSemantics {
if( inherited != null ){
if( result == null ){
result = inherited;
} else if ( inherited != null ) {
if( !data.contentAssist ) {
} else if( !data.contentAssist ) {
if( result instanceof Object [] ){
Object [] r = (Object[]) result;
for( int j = 0; j < r.length && r[j] != null; j++ ) {
if( checkForAmbiguity( data, r[j], inherited ) ){
data.problem = new ProblemBinding( data.astName, IProblemBinding.SEMANTIC_AMBIGUOUS_LOOKUP, data.name() );
data.problem = new ProblemBinding( data.astName,
IProblemBinding.SEMANTIC_AMBIGUOUS_LOOKUP, data.name() );
return null;
}
}
} else {
if( checkForAmbiguity( data, result, inherited ) ){
data.problem = new ProblemBinding( data.astName, IProblemBinding.SEMANTIC_AMBIGUOUS_LOOKUP, data.name() );
data.problem = new ProblemBinding( data.astName,
IProblemBinding.SEMANTIC_AMBIGUOUS_LOOKUP, data.name() );
return null;
}
}
@ -816,7 +817,6 @@ public class CPPSemantics {
}
}
}
}
data.inheritanceChain.remove( lookIn );
@ -2077,7 +2077,7 @@ public class CPPSemantics {
type = (IType) o;
while( type != null ){
type = (type != null) ? getUltimateType( type, false ) : null;
type = getUltimateType( type, false );
if( type == null || !( type instanceof IFunctionType ) )
return new ProblemBinding( data.astName, IProblemBinding.SEMANTIC_AMBIGUOUS_LOOKUP, data.name() );
@ -2450,5 +2450,4 @@ public class CPPSemantics {
}
return false;
}
}