Mercurial > projects > dwt-mac
diff dwt/graphics/Path.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 | 5123b17c98ef |
line wrap: on
line diff
--- a/dwt/graphics/Path.d Wed Aug 27 14:10:03 2008 +0200 +++ b/dwt/graphics/Path.d Wed Aug 27 14:30:35 2008 +0200 @@ -219,10 +219,10 @@ if (font is null) DWT.error(DWT.ERROR_NULL_ARGUMENT); if (font.isDisposed()) DWT.error(DWT.ERROR_INVALID_ARGUMENT); NSString str = NSString.stringWith(string); - NSTextStorage textStorage = ((NSTextStorage)new NSTextStorage().alloc()); + NSTextStorage textStorage = (cast(NSTextStorage)new NSTextStorage().alloc()); textStorage.initWithString_(str); - NSLayoutManager layoutManager = (NSLayoutManager)new NSLayoutManager().alloc().init(); - NSTextContainer textContainer = (NSTextContainer)new NSTextContainer().alloc(); + NSLayoutManager layoutManager = cast(NSLayoutManager)new NSLayoutManager().alloc().init(); + NSTextContainer textContainer = cast(NSTextContainer)new NSTextContainer().alloc(); NSSize size = new NSSize(); size.width = Float.MAX_VALUE; size.height = Float.MAX_VALUE; @@ -413,26 +413,26 @@ case OS.NSMoveToBezierPathElement: types[typeCount++] = DWT.PATH_MOVE_TO; OS.memmove(pt, points, NSPoint.sizeof); - pointArray[pointCount++] = (int)pt.x; - pointArray[pointCount++] = (int)pt.y; + pointArray[pointCount++] = cast(int)pt.x; + pointArray[pointCount++] = cast(int)pt.y; break; case OS.NSLineToBezierPathElement: types[typeCount++] = DWT.PATH_LINE_TO; OS.memmove(pt, points, NSPoint.sizeof); - pointArray[pointCount++] = (int)pt.x; - pointArray[pointCount++] = (int)pt.y; + pointArray[pointCount++] = cast(int)pt.x; + pointArray[pointCount++] = cast(int)pt.y; break; case OS.NSCurveToBezierPathElement: types[typeCount++] = DWT.PATH_CUBIC_TO; OS.memmove(pt, points, NSPoint.sizeof); - pointArray[pointCount++] = (int)pt.x; - pointArray[pointCount++] = (int)pt.y; + pointArray[pointCount++] = cast(int)pt.x; + pointArray[pointCount++] = cast(int)pt.y; OS.memmove(pt, points + NSPoint.sizeof, NSPoint.sizeof); - pointArray[pointCount++] = (int)pt.x; - pointArray[pointCount++] = (int)pt.y; + pointArray[pointCount++] = cast(int)pt.x; + pointArray[pointCount++] = cast(int)pt.y; OS.memmove(pt, points + NSPoint.sizeof + NSPoint.sizeof, NSPoint.sizeof); - pointArray[pointCount++] = (int)pt.x; - pointArray[pointCount++] = (int)pt.y; + pointArray[pointCount++] = cast(int)pt.x; + pointArray[pointCount++] = cast(int)pt.y; break; case OS.NSClosePathBezierPathElement: types[typeCount++] = DWT.PATH_CLOSE;