diff dwt/widgets/Scrollable.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 060cdd4457aa
line wrap: on
line diff
--- a/dwt/widgets/Scrollable.d	Wed Aug 27 14:10:03 2008 +0200
+++ b/dwt/widgets/Scrollable.d	Wed Aug 27 14:30:35 2008 +0200
@@ -114,8 +114,8 @@
         size.height = height;
         int border = hasBorder() ? OS.NSBezelBorder : OS.NSNoBorder;
         size = NSScrollView.frameSizeForContentSize(size, (style & DWT.H_SCROLL) !is 0, (style & DWT.V_SCROLL) !is 0, border);
-        width = (int)size.width;
-        height = (int)size.height;
+        width = cast(int)size.width;
+        height = cast(int)size.height;
         NSRect frame = scrollView.contentView().frame();
         x -= frame.x;
         y -= frame.y;
@@ -174,10 +174,10 @@
     checkWidget();
     if (scrollView !is null) {
         NSSize size = scrollView.contentSize();
-        return new Rectangle(0, 0, (int)size.width, (int)size.height);
+        return new Rectangle(0, 0, cast(int)size.width, cast(int)size.height);
     } else {
         NSRect rect = view.bounds();
-        return new Rectangle(0, 0, (int)rect.width, (int)rect.height);
+        return new Rectangle(0, 0, cast(int)rect.width, cast(int)rect.height);
     }
 }
 
@@ -252,8 +252,8 @@
 //  int width, height;
 //  CGRect rect = new CGRect (); 
 //  OS.HIViewGetBounds (scrolledHandle, rect);
-//  width = (int) rect.width;
-//  height = (int) rect.height;
+//  width = cast(int) rect.width;
+//  height = cast(int) rect.height;
 //  Rect inset = inset ();
 //  width = Math.max (0, width - vWidth - inset.left - inset.right);
 //  height = Math.max (0, height - hHeight - inset.top - inset.bottom);