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

Unified Diff: sdk/lib/math/rectangle.dart

Issue 145973005: Change Rectangle.operator== to compare right/bottom instead of width/height. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Fix typo Created 6 years, 11 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
« no previous file with comments | « no previous file | tests/lib/math/rectangle_test.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: sdk/lib/math/rectangle.dart
diff --git a/sdk/lib/math/rectangle.dart b/sdk/lib/math/rectangle.dart
index e0a3b9870fce43a6644f1baa255ffe8f6ca82ac0..0673b0d2740f37429bf34ba023938d4c714a5692 100644
--- a/sdk/lib/math/rectangle.dart
+++ b/sdk/lib/math/rectangle.dart
@@ -36,12 +36,12 @@ abstract class _RectangleBase<T extends num> {
bool operator ==(other) {
if (other is !Rectangle) return false;
- return left == other.left && top == other.top && width == other.width &&
- height == other.height;
+ return left == other.left && top == other.top && right == other.right &&
+ bottom == other.bottom;
}
int get hashCode => _JenkinsSmiHash.hash4(left.hashCode, top.hashCode,
- width.hashCode, height.hashCode);
+ right.hashCode, bottom.hashCode);
/**
* Computes the intersection of `this` and [other].
« no previous file with comments | « no previous file | tests/lib/math/rectangle_test.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698