mirror of
https://github.com/eclipse-cdt/cdt
synced 2025-07-23 17:05:26 +02:00
Minor optimization.
This commit is contained in:
parent
25a5e3e01f
commit
8e3b8e26e4
1 changed files with 6 additions and 8 deletions
|
@ -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;
|
||||
|
|
Loading…
Add table
Reference in a new issue