mirror of
https://github.com/eclipse-cdt/cdt
synced 2025-06-09 10:46:02 +02:00
Correct distinction of search results, bug 157585.
This commit is contained in:
parent
0cbcb912a5
commit
dde5816f8e
1 changed files with 2 additions and 4 deletions
|
@ -38,7 +38,7 @@ public class TypeInfoSearchElement extends PDOMSearchElement {
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public int hashCode() {
|
public int hashCode() {
|
||||||
return super.hashCode() + (typeInfo.getCElementType() *31 + typeInfo.getName().hashCode())*31;
|
return super.hashCode() + typeInfo.hashCode()*31;
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
@ -49,9 +49,7 @@ public class TypeInfoSearchElement extends PDOMSearchElement {
|
||||||
if (!(obj instanceof TypeInfoSearchElement))
|
if (!(obj instanceof TypeInfoSearchElement))
|
||||||
return false;
|
return false;
|
||||||
TypeInfoSearchElement other= (TypeInfoSearchElement)obj;
|
TypeInfoSearchElement other= (TypeInfoSearchElement)obj;
|
||||||
return typeInfo.getCElementType() == other.typeInfo.getCElementType() &&
|
return super.equals(other) && typeInfo.equals(other.typeInfo);
|
||||||
typeInfo.getName().equals(other.typeInfo.getName()) &&
|
|
||||||
super.equals(other);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public final ITypeInfo getTypeInfo() {
|
public final ITypeInfo getTypeInfo() {
|
||||||
|
|
Loading…
Add table
Reference in a new issue