Mercurial > projects > dwt-mac
diff dwt/dwthelper/utils.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 | 5b53d338c709 |
line wrap: on
line diff
--- a/dwt/dwthelper/utils.d Wed Aug 27 14:36:41 2008 +0200 +++ b/dwt/dwthelper/utils.d Thu Aug 28 12:31:10 2008 +0200 @@ -25,7 +25,7 @@ alias bool boolean; alias char[] String; alias char[] string; -alias tango.text.Text.Text!cast(wchar) StringBuffer; +alias tango.text.Text.Text!(char) StringBuffer; alias opEquals equals; alias PlatformException Error; @@ -59,7 +59,7 @@ return value == other; } public int opEquals( Object other ){ - if( auto o = cast(ValueWrapperT!cast(T))other ){ + if( auto o = cast(ValueWrapperT!(T))other ){ return value == o.value; } return false; @@ -105,7 +105,7 @@ alias Boolean ValueWrapperBool; -class Byte : ValueWrapperT!cast(byte) { +class Byte : ValueWrapperT!(byte) { public static byte parseByte( String s ){ try{ int res = tango.text.convert.Integer.parse( s ); @@ -125,7 +125,7 @@ alias Byte ValueWrapperByte; -class Integer : ValueWrapperT!cast(int) { +class Integer : ValueWrapperT!(int) { public static const int MIN_VALUE = 0x80000000; public static const int MAX_VALUE = 0x7fffffff; @@ -236,7 +236,7 @@ } alias Integer ValueWrapperInt; -class Double : ValueWrapperT!cast(double) { +class Double : ValueWrapperT!(double) { this( double value ){ super(value); } @@ -253,7 +253,7 @@ } } -class Float : ValueWrapperT!cast(float) { +class Float : ValueWrapperT!(float) { public static float POSITIVE_INFINITY = (1.0f / 0.0f); public static float NEGATIVE_INFINITY = ((-1.0f) / 0.0f); @@ -286,7 +286,7 @@ } } -class Long : ValueWrapperT!cast(long) { +class Long : ValueWrapperT!(long) { this( long value ){ super(value); } @@ -309,13 +309,13 @@ alias Long ValueWrapperLong; -// alias ValueWrapperT!cast(int) ValueWrapperInt; +// alias ValueWrapperT!(int) ValueWrapperInt; -alias ArrayWrapperT!cast(byte) ArrayWrapperByte; -alias ArrayWrapperT!cast(int) ArrayWrapperInt; -alias ArrayWrapperT!cast(Object) ArrayWrapperObject; -alias ArrayWrapperT!cast(wchar) ArrayWrapperString; -alias ArrayWrapperT!cast(String) ArrayWrapperString2; +alias ArrayWrapperT!(byte) ArrayWrapperByte; +alias ArrayWrapperT!(int) ArrayWrapperInt; +alias ArrayWrapperT!(Object) ArrayWrapperObject; +alias ArrayWrapperT!(char) ArrayWrapperString; +alias ArrayWrapperT!(String) ArrayWrapperString2; Object[] StringArrayToObjectArray( String[] strs ){ Object[] res = new Object[strs.length]; @@ -786,9 +786,9 @@ } void ExceptionPrintStackTrace( Exception e ){ - this( e, Stderr ); + ExceptionPrintStackTrace( e, Stderr ); } -void ExceptionPrintStackTrace( Exception e, Print!cast(wchar) print ){ +void ExceptionPrintStackTrace( Exception e, Print!(char) print ){ Exception exception = e; while( exception !is null ){ print.formatln( "Exception in {}({}): {}", exception.file, exception.line, exception.msg ); @@ -914,7 +914,7 @@ } } -int SeqIndexOf(T)( tango.util.collection.model.Seq.Seq!cast(T) s, T src ){ +int SeqIndexOf(T)( tango.util.collection.model.Seq.Seq!(T) s, T src ){ int idx; foreach( e; s ){ if( e == src ){ @@ -937,7 +937,7 @@ return res; } -int seqIndexOf( tango.util.collection.model.Seq.Seq!cast(Object) seq, Object v ){ +int seqIndexOf( tango.util.collection.model.Seq.Seq!(Object) seq, Object v ){ int res = -1; int idx = 0; foreach( p; seq ){