Use hashValues instead of hard-coded hashCode getters

This commit is contained in:
Ian Hickson
2015-12-09 21:59:42 -08:00
parent 43d9766806
commit d8a3ed3efc
14 changed files with 61 additions and 172 deletions

View File

@@ -21,7 +21,7 @@ class StockRowPartKey extends Key {
&& stock == typedOther.stock
&& part == typedOther.part;
}
int get hashCode => 37 * (37 * (37 * (373) + identityHashCode(keySalt)) + identityHashCode(stock)) + identityHashCode(part);
int get hashCode => hashValues(keySalt, stock, part);
String toString() => '[$runtimeType ${keySalt.toString().split(".")[1]}:${stock.symbol}:${part.toString().split(".")[1]}]';
}