This reverts commit 9846fa5145.
This commit is contained in:
@@ -610,7 +610,7 @@ class Hash256 {
|
||||
}
|
||||
|
||||
@override
|
||||
int get hashCode => Object.hash(a, b, c, d);
|
||||
int get hashCode => a ^ b ^ c ^ d;
|
||||
}
|
||||
|
||||
// DO NOT ADD ANY ENTRIES TO THIS LIST.
|
||||
|
||||
@@ -28,7 +28,20 @@ class RunningProcessInfo {
|
||||
}
|
||||
|
||||
@override
|
||||
int get hashCode => Object.hash(pid, commandLine, creationDate);
|
||||
int get hashCode {
|
||||
// TODO(dnfield): Replace this when Object.hashValues lands, https://github.com/dart-lang/sdk/issues/11617
|
||||
int hash = 17;
|
||||
if (pid != null) {
|
||||
hash = hash * 23 + pid.hashCode;
|
||||
}
|
||||
if (commandLine != null) {
|
||||
hash = hash * 23 + commandLine.hashCode;
|
||||
}
|
||||
if (creationDate != null) {
|
||||
hash = hash * 23 + creationDate.hashCode;
|
||||
}
|
||||
return hash;
|
||||
}
|
||||
|
||||
@override
|
||||
String toString() {
|
||||
|
||||
@@ -166,14 +166,15 @@ class CommandArgs {
|
||||
}
|
||||
|
||||
@override
|
||||
int get hashCode {
|
||||
return Object.hash(
|
||||
command,
|
||||
Object.hashAll(arguments ?? const <String>[]),
|
||||
Object.hashAllUnordered(environment?.keys ?? const <String>[]),
|
||||
Object.hashAllUnordered(environment?.values ?? const <String>[]),
|
||||
);
|
||||
}
|
||||
int get hashCode => 17 * (17 * command.hashCode + _hashArguments) + _hashEnvironment;
|
||||
|
||||
int get _hashArguments => arguments != null
|
||||
? const ListEquality<String>().hash(arguments)
|
||||
: null.hashCode;
|
||||
|
||||
int get _hashEnvironment => environment != null
|
||||
? const MapEquality<String, String>().hash(environment)
|
||||
: null.hashCode;
|
||||
}
|
||||
|
||||
class FakeDevice extends AndroidDevice {
|
||||
|
||||
@@ -183,7 +183,8 @@ class Rect {
|
||||
final double bottom;
|
||||
|
||||
@override
|
||||
int get hashCode => Object.hash(top, left, right, bottom);
|
||||
int get hashCode =>
|
||||
top.hashCode ^ left.hashCode ^ right.hashCode ^ bottom.hashCode;
|
||||
|
||||
@override
|
||||
bool operator ==(Object other) {
|
||||
@@ -215,7 +216,7 @@ class Size {
|
||||
final double height;
|
||||
|
||||
@override
|
||||
int get hashCode => Object.hash(width, height);
|
||||
int get hashCode => width.hashCode ^ height.hashCode;
|
||||
|
||||
@override
|
||||
bool operator ==(Object other) {
|
||||
|
||||
@@ -128,7 +128,9 @@ class LocaleInfo implements Comparable<LocaleInfo> {
|
||||
}
|
||||
|
||||
@override
|
||||
int get hashCode => originalString.hashCode;
|
||||
int get hashCode {
|
||||
return originalString.hashCode;
|
||||
}
|
||||
|
||||
@override
|
||||
String toString() {
|
||||
|
||||
@@ -274,7 +274,7 @@ class FrameData {
|
||||
}
|
||||
|
||||
@override
|
||||
int get hashCode => Object.hash(size, Object.hashAll(paths));
|
||||
int get hashCode => size.hashCode ^ paths.hashCode;
|
||||
|
||||
@override
|
||||
String toString() {
|
||||
@@ -328,7 +328,7 @@ class SvgPath {
|
||||
}
|
||||
|
||||
@override
|
||||
int get hashCode => Object.hash(id, Object.hashAll(commands), opacity);
|
||||
int get hashCode => id.hashCode ^ commands.hashCode ^ opacity.hashCode;
|
||||
|
||||
@override
|
||||
String toString() {
|
||||
@@ -377,7 +377,7 @@ class SvgPathCommand {
|
||||
}
|
||||
|
||||
@override
|
||||
int get hashCode => Object.hash(type, Object.hashAll(points));
|
||||
int get hashCode => type.hashCode ^ points.hashCode;
|
||||
|
||||
@override
|
||||
String toString() {
|
||||
|
||||
Reference in New Issue
Block a user