Merge pull request #857 from Hixie/hashCodes

Use hashValues instead of hard-coded hashCode getters
This commit is contained in:
Ian Hickson
2015-12-11 21:46:32 -08:00
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]}]';
}