1
0
Fork 0
mirror of https://github.com/eclipse-cdt/cdt synced 2025-07-24 09:25:31 +02:00

Fix warnings.

This commit is contained in:
Markus Schorn 2008-04-11 09:37:31 +00:00
parent b681d5978e
commit 147b628385
2 changed files with 9 additions and 11 deletions

View file

@ -119,6 +119,7 @@ public class TypeInfoLabelProvider extends LabelProvider {
buf.append(returnType);
}
}
break;
case ICElement.C_VARIABLE:
ITypeReference ref= typeInfo.getResolvedReference();
if (ref != null) {
@ -137,6 +138,7 @@ public class TypeInfoLabelProvider extends LabelProvider {
}
}
}
break;
}
}
if (isSet(SHOW_PATH)) {

View file

@ -184,14 +184,11 @@ public class TypeSelectionDialog extends TwoPaneElementSelector {
}
}
private static class StringComparator implements Comparator {
public int compare(Object left, Object right) {
String leftString = (String) left;
String rightString = (String) right;
int result = leftString.compareToIgnoreCase(rightString);
private static class StringComparator implements Comparator<String> {
public int compare(String left, String right) {
int result = left.compareToIgnoreCase(right);
if (result == 0)
result = leftString.compareTo(rightString);
result = left.compareTo(right);
return result;
}
@ -676,8 +673,7 @@ public class TypeSelectionDialog extends TwoPaneElementSelector {
ArrayList<IndexTypeInfo> result= new ArrayList<IndexTypeInfo>();
Object[] typeInfos= super.getFoldedElements(index);
if (typeInfos != null) {
for (int i = 0; i < typeInfos.length; i++) {
Object typeInfo = typeInfos[i];
for (Object typeInfo : typeInfos) {
if (typeInfo instanceof IndexTypeInfo) {
addFoldedElements((IndexTypeInfo) typeInfo, result);
}
@ -688,8 +684,8 @@ public class TypeSelectionDialog extends TwoPaneElementSelector {
private void addFoldedElements(IndexTypeInfo typeInfo, ArrayList<IndexTypeInfo> result) {
ITypeReference[] refs= typeInfo.getReferences();
for (int i = 0; i < refs.length; i++) {
result.add(new IndexTypeInfo(typeInfo, refs[i]));
for (ITypeReference ref : refs) {
result.add(new IndexTypeInfo(typeInfo, ref));
}
}
}