diff dwt/internal/cocoa/MacGenerator.d @ 7:e831403a80a9

Add 'cast' to casts
author Frank Benoit <benoit@tionex.de>
date Wed, 27 Aug 2008 14:30:35 +0200
parents 380af2bdd8e5
children 30a762abda2a
line wrap: on
line diff
--- a/dwt/internal/cocoa/MacGenerator.d	Wed Aug 27 14:10:03 2008 +0200
+++ b/dwt/internal/cocoa/MacGenerator.d	Wed Aug 27 14:30:35 2008 +0200
@@ -55,7 +55,7 @@
 {
     foreach (str ; xml)
     {
-        Document document = new Document!(char);
+        Document document = new Document!cast(wchar);
         document.parse(str);
         
         foreach (node ; document.root.children)
@@ -85,7 +85,7 @@
 {
     foreach (str ; xml)
     {
-        Document document = new Document!(char);
+        Document document = new Document!cast(wchar);
         document.parse(str);
         
         foreach (node ; document.root.children)
@@ -115,7 +115,7 @@
 {
     foreach (str ; xml)
     {
-        Document document = new Document!(char);
+        Document document = new Document!cast(wchar);
         document.parse(str);
         
         foreach (node ; document.root.children)
@@ -326,7 +326,7 @@
                             } else if (returnNode !is null && isFloatingPoint(returnNode)) {
                                 String type = getJavaType(returnNode);
                                 out("\treturn ");
-                                if (type.opEquals("float")) out("(float)");
+                                if (type.opEquals("float")) out("cast(float)");
                                 out("OS.objc_msgSend_fpret(");
                             } else if (returnNode !is null && isObject(returnNode)) {
                                 out("\tint result = OS.objc_msgSend(");
@@ -435,7 +435,7 @@
         }
     }
     for (Iterator iterator = set.iterator(); iterator.hasNext();) {
-        String sel = (String) iterator.next();
+        String sel = cast(String) iterator.next();
         String selConst = getSelConst(sel);
         out("public static final int ");
         out(selConst);
@@ -574,17 +574,17 @@
             out("_1=cast=(id)");
             outln();
             out(key);
-            out("_2=cast=(SEL)");
+            out("_2=cast=cast(SEL)");
             outln();
         } else {
             out(key);
             out("_0=cast=(id)");
             outln();
             out(key);
-            out("_1=cast=(SEL)");
+            out("_1=cast=cast(SEL)");
             outln();
         }
-        Node method = (Node)set.get(key);
+        Node method = cast(Node)set.get(key);
         NodeList params = method.getChildNodes();
         for (int k = 0; k < params.getLength(); k++) {
             Node param = params.item(k);
@@ -628,7 +628,7 @@
         }
     }
     for (Iterator iterator = set.iterator(); iterator.hasNext();) {
-        String cls = (String) iterator.next();
+        String cls = cast(String) iterator.next();
         String clsConst = "class_" + cls;
         out("public static final int ");
         out(clsConst);