Mercurial > projects > dwt-mac
diff dwt/graphics/GlyphMetrics.d @ 8:a9ab4c738ed8
Fix: instanceof
author | Frank Benoit <benoit@tionex.de> |
---|---|
date | Wed, 27 Aug 2008 14:32:39 +0200 |
parents | e831403a80a9 |
children | b9226997409c |
line wrap: on
line diff
--- a/dwt/graphics/GlyphMetrics.d Wed Aug 27 14:30:35 2008 +0200 +++ b/dwt/graphics/GlyphMetrics.d Wed Aug 27 14:32:39 2008 +0200 @@ -79,7 +79,7 @@ */ public bool equals (Object object) { if (object is this) return true; - if (!(object instanceof GlyphMetrics)) return false; + if (!( null !is cast(GlyphMetrics)object )) return false; GlyphMetrics metrics = cast(GlyphMetrics)object; return metrics.ascent is ascent && metrics.descent is descent && metrics.width is width; }