Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(23)

Unified Diff: tools/dom/src/Rectangle.dart

Issue 18034021: Fixing analyzer warnings on overloading == but not get hashCode. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 7 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: tools/dom/src/Rectangle.dart
diff --git a/tools/dom/src/Rectangle.dart b/tools/dom/src/Rectangle.dart
index e87da1146b7cc1434b0a1a6569057750537ded52..e6a80b2f0edc67caa2607040ede9ad3f7d5653c8 100644
--- a/tools/dom/src/Rectangle.dart
+++ b/tools/dom/src/Rectangle.dart
@@ -54,6 +54,9 @@ class Rect {
height == other.height;
}
+ int get hashCode => JenkinsSmiHash.hash4(left.hashCode, top.hashCode,
+ width.hashCode, height.hashCode);
+
/**
* Computes the intersection of this rectangle and the rectangle parameter.
* Returns null if there is no intersection.

Powered by Google App Engine
This is Rietveld 408576698