1
0
Fork 0
mirror of https://github.com/eclipse-cdt/cdt synced 2025-07-11 19:15:22 +02:00

Use generics.

This commit is contained in:
Sergey Prigogin 2008-01-20 20:39:32 +00:00
parent c847fa362e
commit b1d9fbf392

View file

@ -91,7 +91,7 @@ public class CPPASTBaseSpecifier extends CPPASTNode implements
public IBinding[] findBindings(IASTName n, boolean isPrefix) { public IBinding[] findBindings(IASTName n, boolean isPrefix) {
IBinding[] bindings = CPPSemantics.findBindingsForContentAssist(n, isPrefix); IBinding[] bindings = CPPSemantics.findBindingsForContentAssist(n, isPrefix);
List filtered = new ArrayList(); List<IBinding> filtered = new ArrayList<IBinding>();
ICPPClassType classType = null; ICPPClassType classType = null;
if (getParent() instanceof CPPASTCompositeTypeSpecifier) { if (getParent() instanceof CPPASTCompositeTypeSpecifier) {
@ -102,7 +102,6 @@ public class CPPASTBaseSpecifier extends CPPASTNode implements
} }
} }
for (int i = 0; i < bindings.length; i++) { for (int i = 0; i < bindings.length; i++) {
if (bindings[i] instanceof ICPPClassType) { if (bindings[i] instanceof ICPPClassType) {
ICPPClassType base = (ICPPClassType) bindings[i]; ICPPClassType base = (ICPPClassType) bindings[i];
@ -117,6 +116,6 @@ public class CPPASTBaseSpecifier extends CPPASTNode implements
} }
} }
return (IBinding[]) filtered.toArray(new IBinding[filtered.size()]); return filtered.toArray(new IBinding[filtered.size()]);
} }
} }