Mercurial > projects > dwt-linux
changeset 137:0f8bb00f569e
== to is
author | Frank Benoit <benoit@tionex.de> |
---|---|
date | Mon, 21 Jan 2008 19:04:50 +0100 |
parents | bdc6819466b7 |
children | 31981a851d5b |
files | dwt/graphics/Font.d |
diffstat | 1 files changed, 7 insertions(+), 7 deletions(-) [+] |
line wrap: on
line diff
--- a/dwt/graphics/Font.d Mon Jan 21 19:01:09 2008 +0100 +++ b/dwt/graphics/Font.d Mon Jan 21 19:04:50 2008 +0100 @@ -105,7 +105,7 @@ if (device is null) device = Device.getDevice(); if (device is null) DWT.error(DWT.ERROR_NULL_ARGUMENT); if (fds is null) DWT.error(DWT.ERROR_NULL_ARGUMENT); - if (fds.length == 0) DWT.error(DWT.ERROR_INVALID_ARGUMENT); + if (fds.length is 0) DWT.error(DWT.ERROR_INVALID_ARGUMENT); for (int i=0; i<fds.length; i++) { if (fds[i] is null) DWT.error(DWT.ERROR_INVALID_ARGUMENT); } @@ -175,7 +175,7 @@ * @see #hashCode */ public int opEquals(Object object) { - if (object == this) return true; + if (object is this) return true; if ( auto font = cast(Font)object ){ return handle is font.handle; } @@ -204,8 +204,8 @@ int pangoStyle = OS.pango_font_description_get_style(handle); int pangoWeight = OS.pango_font_description_get_weight(handle); int style = DWT.NORMAL; - if (pangoStyle == OS.PANGO_STYLE_ITALIC) style |= DWT.ITALIC; - if (pangoStyle == OS.PANGO_STYLE_OBLIQUE) style |= DWT.ROMAN; + if (pangoStyle is OS.PANGO_STYLE_ITALIC) style |= DWT.ITALIC; + if (pangoStyle is OS.PANGO_STYLE_OBLIQUE) style |= DWT.ROMAN; if (pangoWeight >= OS.PANGO_WEIGHT_BOLD) style |= DWT.BOLD; auto fontString = OS.pango_font_description_to_string (handle); auto buffer = fromUtf8z( fontString ).dup; @@ -268,9 +268,9 @@ OS.pango_font_description_set_stretch(handle, OS.PANGO_STRETCH_NORMAL); int pangoStyle = OS.PANGO_STYLE_NORMAL; int pangoWeight = OS.PANGO_WEIGHT_NORMAL; - if ((style & DWT.ITALIC) != 0) pangoStyle = OS.PANGO_STYLE_ITALIC; - if ((style & DWT.ROMAN) != 0) pangoStyle = OS.PANGO_STYLE_OBLIQUE; - if ((style & DWT.BOLD) != 0) pangoWeight = OS.PANGO_WEIGHT_BOLD; + if ((style & DWT.ITALIC) !is 0) pangoStyle = OS.PANGO_STYLE_ITALIC; + if ((style & DWT.ROMAN) !is 0) pangoStyle = OS.PANGO_STYLE_OBLIQUE; + if ((style & DWT.BOLD) !is 0) pangoWeight = OS.PANGO_WEIGHT_BOLD; OS.pango_font_description_set_style(handle, pangoStyle); OS.pango_font_description_set_weight(handle, pangoWeight); }