# HG changeset patch # User Frank Benoit # Date 1205164144 -3600 # Node ID 4d06074bb1af4120ce68ebcfb1b7fdd5865fead8 # Parent c4643827733c1ef64841febbabcfa23f4f64c29d sync with dwt-linux diff -r c4643827733c -r 4d06074bb1af dwt/layout/FormAttachment.d --- a/dwt/layout/FormAttachment.d Mon Mar 10 16:48:51 2008 +0100 +++ b/dwt/layout/FormAttachment.d Mon Mar 10 16:49:04 2008 +0100 @@ -185,7 +185,7 @@ * @param offset the offset of the side from the position */ public this (int numerator, int denominator, int offset) { - if (denominator is 0) DWT.error (DWT.ERROR_CANNOT_BE_ZERO); + if (denominator == 0) DWT.error (DWT.ERROR_CANNOT_BE_ZERO); this.numerator = numerator; this.denominator = denominator; this.offset = offset; @@ -244,7 +244,7 @@ m = n; n = temp; } - while (n !is 0){ + while (n != 0){ temp = m; m = n; n = temp % n; @@ -283,12 +283,12 @@ } int solveX (int value) { - if (denominator is 0) DWT.error (DWT.ERROR_CANNOT_BE_ZERO); + if (denominator == 0) DWT.error (DWT.ERROR_CANNOT_BE_ZERO); return ((numerator * value) / denominator) + offset; } int solveY (int value) { - if (numerator is 0) DWT.error (DWT.ERROR_CANNOT_BE_ZERO); + if (numerator == 0) DWT.error (DWT.ERROR_CANNOT_BE_ZERO); return (value - offset) * denominator / numerator; } @@ -298,8 +298,8 @@ * * @return a string representation of the FormAttachment */ -public override char[] toString () { - char[] string = control !is null ? control.toString () : Format( "{}/{}", numerator, denominator ); +override public char[] toString () { + char[] string = control != null ? control.toString () : Format( "{}/{}", numerator, denominator ); return Format("{{y = ({})x + {}}", string, ( offset >= 0 ? Format(")x + {}", offset ) : Format( ")x - {}", -offset))); }