1
0
Fork 0
mirror of https://github.com/eclipse-cdt/cdt synced 2025-07-23 17:05:26 +02:00

Minor optimization.

This commit is contained in:
Sergey Prigogin 2008-04-13 04:17:39 +00:00
parent 25a5e3e01f
commit 8e3b8e26e4

View file

@ -27,10 +27,8 @@ import org.eclipse.core.runtime.CoreException;
/**
* @author Bryan Wilkinson
*
*/
abstract class PDOMCPPInstance extends PDOMCPPSpecialization implements
ICPPTemplateInstance {
abstract class PDOMCPPInstance extends PDOMCPPSpecialization implements ICPPTemplateInstance {
private static final int ARGUMENTS = PDOMCPPSpecialization.RECORD_SIZE + 0;
@ -84,17 +82,17 @@ abstract class PDOMCPPInstance extends PDOMCPPSpecialization implements
return visitor.getTemplateArguments();
} catch (CoreException e) {
CCorePlugin.log(e);
return new IType[0];
return IType.EMPTY_TYPE_ARRAY;
}
}
@Override
public boolean matchesArguments(IType[] arguments) {
IType [] args = getArguments();
if( args.length == arguments.length ){
IType[] args = getArguments();
if (args.length == arguments.length) {
int i = 0;
for(; i < args.length; i++) {
if( !( args[i].isSameType( arguments[i] ) ) )
for (; i < args.length; i++) {
if (!(args[i].isSameType(arguments[i])))
break;
}
return i == args.length;