diff dwt/dnd/RTFTransfer.d @ 7:e831403a80a9

Add 'cast' to casts
author Frank Benoit <benoit@tionex.de>
date Wed, 27 Aug 2008 14:30:35 +0200
parents 1a8b3cb347e0
children e76aa0b07480
line wrap: on
line diff
--- a/dwt/dnd/RTFTransfer.d	Wed Aug 27 14:10:03 2008 +0200
+++ b/dwt/dnd/RTFTransfer.d	Wed Aug 27 14:30:35 2008 +0200
@@ -57,7 +57,7 @@
         DND.error(DND.ERROR_INVALID_DATA);
     }
     transferData.result = -1;
-    String String = (String)object;
+    String String = cast(String)object;
     int count = String.length();
     char[] chars = new char[count];
     String.getChars(0, count, chars, 0);
@@ -68,10 +68,10 @@
         range.length = chars.length;
         int encoding = OS.CFStringGetSystemEncoding();
         int[] size = new int[1];
-        int numChars = OS.CFStringGetBytes(cfString, range, encoding, (byte)'?', true, null, 0, size);
+        int numChars = OS.CFStringGetBytes(cfString, range, encoding, cast(byte)'?', true, null, 0, size);
         if (numChars is 0 || size[0] is 0) return;
         byte[] buffer = new byte[size[0]];
-        numChars = OS.CFStringGetBytes(cfString, range, encoding, (byte)'?', true, buffer, size [0], size);
+        numChars = OS.CFStringGetBytes(cfString, range, encoding, cast(byte)'?', true, buffer, size [0], size);
         if (numChars is 0) return;
         transferData.data = new byte[1][];
         transferData.data[0] = buffer;
@@ -120,7 +120,7 @@
 }
 
 bool checkRTF(Object object) {
-    return (object !is null && object instanceof String && ((String)object).length() > 0);
+    return (object !is null && object instanceof String && (cast(String)object).length() > 0);
 }
 
 protected bool validate(Object object) {