diff --git a/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/search/TypeInfoSearchElement.java b/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/search/TypeInfoSearchElement.java index 7df91828d52..ad4bda034c7 100644 --- a/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/search/TypeInfoSearchElement.java +++ b/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/search/TypeInfoSearchElement.java @@ -38,7 +38,7 @@ public class TypeInfoSearchElement extends PDOMSearchElement { @Override public int hashCode() { - return super.hashCode() + (typeInfo.getCElementType() *31 + typeInfo.getName().hashCode())*31; + return super.hashCode() + typeInfo.hashCode()*31; } @Override @@ -49,9 +49,7 @@ public class TypeInfoSearchElement extends PDOMSearchElement { if (!(obj instanceof TypeInfoSearchElement)) return false; TypeInfoSearchElement other= (TypeInfoSearchElement)obj; - return typeInfo.getCElementType() == other.typeInfo.getCElementType() && - typeInfo.getName().equals(other.typeInfo.getName()) && - super.equals(other); + return super.equals(other) && typeInfo.equals(other.typeInfo); } public final ITypeInfo getTypeInfo() {