diff dwt/custom/ScrolledCompositeLayout.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 6337764516f1
line wrap: on
line diff
--- a/dwt/custom/ScrolledCompositeLayout.d	Wed Aug 27 14:10:03 2008 +0200
+++ b/dwt/custom/ScrolledCompositeLayout.d	Wed Aug 27 14:30:35 2008 +0200
@@ -26,7 +26,7 @@
     static final int DEFAULT_HEIGHT = 64;
     
 protected Point computeSize(Composite composite, int wHint, int hHint, bool flushCache) {
-    ScrolledComposite sc = (ScrolledComposite)composite;
+    ScrolledComposite sc = cast(ScrolledComposite)composite;
     Point size = new Point(DEFAULT_WIDTH, DEFAULT_HEIGHT);
     if (sc.content !is null) {
         Point preferredSize = sc.content.computeSize(wHint, hHint, flushCache);
@@ -47,7 +47,7 @@
 
 protected void layout(Composite composite, bool flushCache) {
     if (inLayout) return;
-    ScrolledComposite sc = (ScrolledComposite)composite;
+    ScrolledComposite sc = cast(ScrolledComposite)composite;
     if (sc.content is null) return;
     ScrollBar hBar = sc.getHorizontalBar();
     ScrollBar vBar = sc.getVerticalBar();