Mercurial > projects > dwt-mac
comparison dwt/graphics/FontMetrics.d @ 8:a9ab4c738ed8
Fix: instanceof
author | Frank Benoit <benoit@tionex.de> |
---|---|
date | Wed, 27 Aug 2008 14:32:39 +0200 |
parents | e831403a80a9 |
children | 5123b17c98ef |
comparison
equal
deleted
inserted
replaced
7:e831403a80a9 | 8:a9ab4c738ed8 |
---|---|
48 * | 48 * |
49 * @see #hashCode | 49 * @see #hashCode |
50 */ | 50 */ |
51 public bool equals (Object object) { | 51 public bool equals (Object object) { |
52 if (object is this) return true; | 52 if (object is this) return true; |
53 if (!(object instanceof FontMetrics)) return false; | 53 if (!( null !is cast(FontMetrics)object )) return false; |
54 FontMetrics metrics = cast(FontMetrics)object; | 54 FontMetrics metrics = cast(FontMetrics)object; |
55 return ascent is metrics.ascent && descent is metrics.descent && | 55 return ascent is metrics.ascent && descent is metrics.descent && |
56 averageCharWidth is metrics.averageCharWidth && leading is metrics.leading && | 56 averageCharWidth is metrics.averageCharWidth && leading is metrics.leading && |
57 height is metrics.height; | 57 height is metrics.height; |
58 } | 58 } |