mirror of
https://github.com/eclipse-cdt/cdt
synced 2025-04-29 19:45:01 +02:00
Use generics.
This commit is contained in:
parent
7cdbcfc0f9
commit
2d4cd87741
1 changed files with 21 additions and 24 deletions
|
@ -51,7 +51,6 @@ public class CPPFunctionScope extends CPPScope implements ICPPFunctionScope {
|
|||
super(physicalNode);
|
||||
}
|
||||
|
||||
|
||||
/* (non-Javadoc)
|
||||
* @see org.eclipse.cdt.core.dom.ast.cpp.ICPPScope#addBinding(org.eclipse.cdt.core.dom.ast.IBinding)
|
||||
*/
|
||||
|
@ -78,12 +77,12 @@ public class CPPFunctionScope extends CPPScope implements ICPPFunctionScope {
|
|||
*/
|
||||
public IBinding[] find(String name) throws DOMException {
|
||||
char[] n = name.toCharArray();
|
||||
List bindings = new ArrayList();
|
||||
List<IBinding> bindings = new ArrayList<IBinding>();
|
||||
|
||||
for (int i = 0; i < labels.size(); i++) {
|
||||
char[] key = labels.keyAt(i);
|
||||
if (CharArrayUtils.equals(key, n)) {
|
||||
bindings.add(labels.get(key));
|
||||
bindings.add((IBinding) labels.get(key));
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -92,7 +91,7 @@ public class CPPFunctionScope extends CPPScope implements ICPPFunctionScope {
|
|||
bindings.add(additional[i]);
|
||||
}
|
||||
|
||||
return (IBinding[]) bindings.toArray(new IBinding[bindings.size()]);
|
||||
return bindings.toArray(new IBinding[bindings.size()]);
|
||||
}
|
||||
|
||||
public IScope getParent() throws DOMException {
|
||||
|
@ -120,7 +119,6 @@ public class CPPFunctionScope extends CPPScope implements ICPPFunctionScope {
|
|||
return CPPVisitor.getContainingScope(name);
|
||||
}
|
||||
|
||||
|
||||
/* (non-Javadoc)
|
||||
* @see org.eclipse.cdt.core.dom.ast.cpp.ICPPFunctionScope#getBodyScope()
|
||||
*/
|
||||
|
@ -135,7 +133,6 @@ public class CPPFunctionScope extends CPPScope implements ICPPFunctionScope {
|
|||
return null;
|
||||
}
|
||||
|
||||
|
||||
/* (non-Javadoc)
|
||||
* @see org.eclipse.cdt.core.dom.ast.cpp.ICPPScope#getScopeName()
|
||||
*/
|
||||
|
|
Loading…
Add table
Reference in a new issue