Mercurial > projects > dwt-linux
changeset 148:ee9953d47114
some ==/is replacements, thanks torhu for bug report
author | Frank Benoit <benoit@tionex.de> |
---|---|
date | Sat, 26 Jan 2008 00:14:01 +0100 |
parents | 4a1b8869428e |
children | 2eb6d07425c9 |
files | dwt/graphics/Point.d dwt/graphics/Rectangle.d dwt/widgets/RunnableLock.d |
diffstat | 3 files changed, 7 insertions(+), 7 deletions(-) [+] |
line wrap: on
line diff
--- a/dwt/graphics/Point.d Wed Jan 23 18:40:53 2008 +0100 +++ b/dwt/graphics/Point.d Sat Jan 26 00:14:01 2008 +0100 @@ -79,7 +79,7 @@ public override int opEquals (Object object) { if (object is this) return true; if ( auto p = cast(Point)object ){ - return (p.x == this.x) && (p.y == this.y); + return (p.x is this.x) && (p.y is this.y); } return false; }
--- a/dwt/graphics/Rectangle.d Wed Jan 23 18:40:53 2008 +0100 +++ b/dwt/graphics/Rectangle.d Sat Jan 26 00:14:01 2008 +0100 @@ -140,7 +140,7 @@ * </ul> */ public bool contains (Point pt) { - if (pt == null) DWT.error(DWT.ERROR_NULL_ARGUMENT); + if (pt is null) DWT.error(DWT.ERROR_NULL_ARGUMENT); return contains(pt.x, pt.y); } @@ -157,7 +157,7 @@ public override int opEquals (Object object) { if (object is this) return true; if( auto r = cast(Rectangle) object ){ - return (r.x == this.x) && (r.y == this.y) && (r.width == this.width) && (r.height == this.height); + return (r.x is this.x) && (r.y is this.y) && (r.width is this.width) && (r.height is this.height); } return false; } @@ -287,8 +287,8 @@ * @see #isEmpty() */ public bool intersects (Rectangle rect) { - if (rect == null) DWT.error(DWT.ERROR_NULL_ARGUMENT); - return rect == this || intersects (rect.x, rect.y, rect.width, rect.height); + if (rect is null) DWT.error(DWT.ERROR_NULL_ARGUMENT); + return rect is this || intersects (rect.x, rect.y, rect.width, rect.height); } /**
--- a/dwt/widgets/RunnableLock.d Wed Jan 23 18:40:53 2008 +0100 +++ b/dwt/widgets/RunnableLock.d Sat Jan 26 00:14:01 2008 +0100 @@ -33,11 +33,11 @@ } bool done () { - return runnable == null || throwable != null; + return runnable is null || throwable !is null; } void run () { - if (runnable != null) runnable.run (); + if (runnable !is null) runnable.run (); runnable = null; }