diff dwt/internal/image/OS2BMPFileFormat.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 5123b17c98ef
line wrap: on
line diff
--- a/dwt/internal/image/OS2BMPFileFormat.d	Wed Aug 27 14:10:03 2008 +0200
+++ b/dwt/internal/image/OS2BMPFileFormat.d	Wed Aug 27 14:30:35 2008 +0200
@@ -149,9 +149,9 @@
     int offset = 0;
     for (int i = 0; i < n; i++) {
         RGB col = pal.colors[i];
-        bytes[offset] = (byte)col.blue;
-        bytes[offset + 1] = (byte)col.green;
-        bytes[offset + 2] = (byte)col.red;
+        bytes[offset] = cast(byte)col.blue;
+        bytes[offset + 1] = cast(byte)col.green;
+        bytes[offset + 2] = cast(byte)col.red;
         offset += 3;
     }
     return bytes;
@@ -262,7 +262,7 @@
         outputStream.writeShort(image.width);
         outputStream.writeShort(image.height);
         outputStream.writeShort(1);
-        outputStream.writeShort((short)image.depth);
+        outputStream.writeShort(cast(short)image.depth);
     } catch (IOException e) {
         DWT.error(DWT.ERROR_IO, e);
     }