Mercurial > projects > dwt-mac
comparison dwt/widgets/Monitor.d @ 8:a9ab4c738ed8
Fix: instanceof
author | Frank Benoit <benoit@tionex.de> |
---|---|
date | Wed, 27 Aug 2008 14:32:39 +0200 |
parents | e831403a80a9 |
children | 5b53d338c709 |
comparison
equal
deleted
inserted
replaced
7:e831403a80a9 | 8:a9ab4c738ed8 |
---|---|
42 * | 42 * |
43 * @see #hashCode() | 43 * @see #hashCode() |
44 */ | 44 */ |
45 public bool equals (Object object) { | 45 public bool equals (Object object) { |
46 if (object is this) return true; | 46 if (object is this) return true; |
47 if (!(object instanceof Monitor)) return false; | 47 if (!( null !is cast(Monitor)object )) return false; |
48 Monitor monitor = cast(Monitor) object; | 48 Monitor monitor = cast(Monitor) object; |
49 return handle is monitor.handle; | 49 return handle is monitor.handle; |
50 } | 50 } |
51 | 51 |
52 /** | 52 /** |