Mercurial > projects > dwt-mac
diff dwt/widgets/Composite.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 | a9ab4c738ed8 |
line wrap: on
line diff
--- a/dwt/widgets/Composite.d Wed Aug 27 14:10:03 2008 +0200 +++ b/dwt/widgets/Composite.d Wed Aug 27 14:30:35 2008 +0200 @@ -109,7 +109,7 @@ Object widget = OS.JNIGetObject(tag); if (widget !is null && widget !is this) { if (widget instanceof Control) { - children [j++] = (Control) widget; + children [j++] = cast(Control) widget; } } } @@ -248,7 +248,7 @@ state |= CANVAS; NSRect rect = new NSRect(); if ((style & (DWT.V_SCROLL | DWT.H_SCROLL)) !is 0 || hasBorder ()) { - SWTScrollView scrollWidget = (SWTScrollView)new SWTScrollView().alloc(); + SWTScrollView scrollWidget = cast(SWTScrollView)new SWTScrollView().alloc(); scrollWidget.initWithFrame (rect); scrollWidget.setDrawsBackground(false); if ((style & DWT.H_SCROLL) !is 0) scrollWidget.setHasHorizontalScroller(true); @@ -258,7 +258,7 @@ scrollView = scrollWidget; rect.width = rect.height = 100000; } - SWTView widget = (SWTView)new SWTView().alloc(); + SWTView widget = cast(SWTView)new SWTView().alloc(); widget.initWithFrame (rect); // widget.setFocusRingType(OS.NSFocusRingTypeExterior); widget.setTag(jniRef);