comparison dwt/graphics/Rectangle.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
151 * @see #hashCode() 151 * @see #hashCode()
152 */ 152 */
153 public bool equals (Object object) { 153 public bool equals (Object object) {
154 if (object is this) return true; 154 if (object is this) return true;
155 if (!(object instanceof Rectangle)) return false; 155 if (!(object instanceof Rectangle)) return false;
156 Rectangle r = (Rectangle)object; 156 Rectangle r = cast(Rectangle)object;
157 return (r.x is this.x) && (r.y is this.y) && (r.width is this.width) && (r.height is this.height); 157 return (r.x is this.x) && (r.y is this.y) && (r.width is this.width) && (r.height is this.height);
158 } 158 }
159 159
160 /** 160 /**
161 * Returns an integer hash code for the receiver. Any two 161 * Returns an integer hash code for the receiver. Any two