changeset 184:4d06074bb1af

sync with dwt-linux
author Frank Benoit <benoit@tionex.de>
date Mon, 10 Mar 2008 16:49:04 +0100
parents c4643827733c
children 026ce3b05f57
files dwt/layout/FormAttachment.d
diffstat 1 files changed, 6 insertions(+), 6 deletions(-) [+]
line wrap: on
line diff
--- 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)));
 }