Mercurial > projects > dwt-mac
comparison dwt/graphics/FontMetrics.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 |
---|---|
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 (!(object instanceof FontMetrics)) return false; |
54 FontMetrics metrics = (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 } |
59 | 59 |