Mercurial > projects > dwt-mac
comparison dwt/custom/StyleRange.d @ 8:a9ab4c738ed8
Fix: instanceof
author | Frank Benoit <benoit@tionex.de> |
---|---|
date | Wed, 27 Aug 2008 14:32:39 +0200 |
parents | e831403a80a9 |
children | 6337764516f1 |
comparison
equal
deleted
inserted
replaced
7:e831403a80a9 | 8:a9ab4c738ed8 |
---|---|
92 * | 92 * |
93 * @see #toHash() | 93 * @see #toHash() |
94 */ | 94 */ |
95 public bool opEquals(Object object) { | 95 public bool opEquals(Object object) { |
96 if (object is this) return true; | 96 if (object is this) return true; |
97 if (object instanceof StyleRange) { | 97 if ( null !is cast(StyleRange)object ) { |
98 StyleRange style = cast(StyleRange)object; | 98 StyleRange style = cast(StyleRange)object; |
99 if (start !is style.start) return false; | 99 if (start !is style.start) return false; |
100 if (length !is style.length) return false; | 100 if (length !is style.length) return false; |
101 return similarTo(style); | 101 return similarTo(style); |
102 } | 102 } |