Mercurial > projects > dwt-mac
diff dwt/dwthelper/WeakRef.d @ 10:30a762abda2a
Revert automatic changes from dwt/internal and dwt/dwthelper. Excluded dwt/internal/image and theme.
author | Frank Benoit <benoit@tionex.de> |
---|---|
date | Thu, 28 Aug 2008 12:31:10 +0200 |
parents | e831403a80a9 |
children |
line wrap: on
line diff
--- a/dwt/dwthelper/WeakRef.d Wed Aug 27 14:36:41 2008 +0200 +++ b/dwt/dwthelper/WeakRef.d Thu Aug 28 12:31:10 2008 +0200 @@ -20,7 +20,7 @@ class Something {} auto a = new Something(); - auto wa = new WeakRef!cast(Something)(a); + auto wa = new WeakRef!(Something)(a); std.gc.fullCollect(); // Reference 'a' prevents collection so wa.ptr is non-null @@ -36,7 +36,7 @@ * Author: William V. Baxter III * Contributors: * Date: 21 Jan 2008 - * Copyright: cast(C) 2008 William Baxter + * Copyright: (C) 2008 William Baxter * License: Public Domain where allowed by law, ZLIB/PNG otherwise. */ //=========================================================================== @@ -45,8 +45,8 @@ private { alias void delegate(Object) DisposeEvt; - extern cast(C) void rt_attachDisposeEvent( Object obj, DisposeEvt evt ); - extern cast(C) void rt_detachDisposeEvent( Object obj, DisposeEvt evt ); + extern (C) void rt_attachDisposeEvent( Object obj, DisposeEvt evt ); + extern (C) void rt_detachDisposeEvent( Object obj, DisposeEvt evt ); } class WeakRef(T : Object) { @@ -77,7 +77,7 @@ return new WeakRef(ptr()); } int opEquals( Object o ){ - if( auto other = cast( WeakRef!cast(T) )o ){ + if( auto other = cast( WeakRef!(T) )o ){ return other.cast_ptr_ is cast_ptr_; } return false;