mirror of
https://github.com/NationalSecurityAgency/ghidra.git
synced 2025-10-05 02:39:44 +02:00
Merge remote-tracking branch
'origin/GP-2758_HashedFunctionCorrelatorCollision' into patch (Closes #4683)
This commit is contained in:
commit
4f72df352d
1 changed files with 16 additions and 8 deletions
|
@ -29,12 +29,20 @@ public class Hash implements Comparable<Hash> {
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public int compareTo(Hash o) {
|
public int compareTo(Hash o) {
|
||||||
return Long.compare(value, o.value);
|
int cmp = Integer.compare(value, o.value);
|
||||||
|
if (cmp == 0) {
|
||||||
|
return Integer.compare(size, o.size);
|
||||||
|
}
|
||||||
|
return cmp;
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public boolean equals(Object obj) {
|
public boolean equals(Object obj) {
|
||||||
return value == ((Hash)obj).value;
|
Hash o = (Hash) obj;
|
||||||
|
if (value != o.value) {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
return (size == o.size);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
@ -42,7 +50,7 @@ public class Hash implements Comparable<Hash> {
|
||||||
return value;
|
return value;
|
||||||
}
|
}
|
||||||
|
|
||||||
public Hash(int val,int sz) {
|
public Hash(int val, int sz) {
|
||||||
value = val;
|
value = val;
|
||||||
size = sz;
|
size = sz;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue