From dde5816f8e7a58822821504137edf39469e25d8f Mon Sep 17 00:00:00 2001 From: Markus Schorn Date: Fri, 17 Apr 2009 11:22:29 +0000 Subject: [PATCH] Correct distinction of search results, bug 157585. --- .../cdt/internal/ui/search/TypeInfoSearchElement.java | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) 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() {