Mercurial > projects > dwt-mac
comparison dwt/graphics/Point.d @ 7:e831403a80a9
Add 'cast' to casts
author | Frank Benoit <benoit@tionex.de> |
---|---|
date | Wed, 27 Aug 2008 14:30:35 +0200 |
parents | 1a8b3cb347e0 |
children | a9ab4c738ed8 |
comparison
equal
deleted
inserted
replaced
6:b903c16b6f48 | 7:e831403a80a9 |
---|---|
74 * @see #hashCode() | 74 * @see #hashCode() |
75 */ | 75 */ |
76 public bool equals (Object object) { | 76 public bool equals (Object object) { |
77 if (object is this) return true; | 77 if (object is this) return true; |
78 if (!(object instanceof Point)) return false; | 78 if (!(object instanceof Point)) return false; |
79 Point p = (Point)object; | 79 Point p = cast(Point)object; |
80 return (p.x is this.x) && (p.y is this.y); | 80 return (p.x is this.x) && (p.y is this.y); |
81 } | 81 } |
82 | 82 |
83 /** | 83 /** |
84 * Returns an integer hash code for the receiver. Any two | 84 * Returns an integer hash code for the receiver. Any two |