diff options
author | Ville Palo <ville@mono-cvs.ximian.com> | 2003-05-28 12:10:33 +0400 |
---|---|---|
committer | Ville Palo <ville@mono-cvs.ximian.com> | 2003-05-28 12:10:33 +0400 |
commit | 537929587ce3ac8d1b2ce88c210fafce0ab48f95 (patch) | |
tree | ddfc8c40790f48d93f92882e2b4e73b6324b4e57 /mcs/class/System.Data/System.Data.SqlTypes | |
parent | 4f7e50b2a58f44870a88461ebaf2a8db2d3c9090 (diff) |
2003-05-28 Ville Palo <vi64pa@kolumbus.fi>
* SqlInt16.cs: little fixes.
svn path=/trunk/mcs/; revision=14962
Diffstat (limited to 'mcs/class/System.Data/System.Data.SqlTypes')
-rw-r--r-- | mcs/class/System.Data/System.Data.SqlTypes/ChangeLog | 4 | ||||
-rw-r--r-- | mcs/class/System.Data/System.Data.SqlTypes/SqlInt16.cs | 25 |
2 files changed, 17 insertions, 12 deletions
diff --git a/mcs/class/System.Data/System.Data.SqlTypes/ChangeLog b/mcs/class/System.Data/System.Data.SqlTypes/ChangeLog index b8d8955a208..dfc76afff64 100644 --- a/mcs/class/System.Data/System.Data.SqlTypes/ChangeLog +++ b/mcs/class/System.Data/System.Data.SqlTypes/ChangeLog @@ -1,5 +1,9 @@ 2003-05-28 Ville Palo <vi64pa@kolumbus.fi> + * SqlInt16.cs: little fixes. + +2003-05-28 Ville Palo <vi64pa@kolumbus.fi> + * SqlDouble.cs: Some fixes. Mostly infinity checks * SqlSingle.cs: tiny fixes. * SqlInt64.cs: checked fix. diff --git a/mcs/class/System.Data/System.Data.SqlTypes/SqlInt16.cs b/mcs/class/System.Data/System.Data.SqlTypes/SqlInt16.cs index 79325214d40..509c75eb6ad 100644 --- a/mcs/class/System.Data/System.Data.SqlTypes/SqlInt16.cs +++ b/mcs/class/System.Data/System.Data.SqlTypes/SqlInt16.cs @@ -237,7 +237,7 @@ namespace System.Data.SqlTypes public static SqlInt16 operator | (SqlInt16 x, SqlInt16 y) { - return new SqlInt16 ((short) ((byte) x.Value | (byte) y.Value)); + return new SqlInt16 ((short) ( x.Value | y.Value)); } public static SqlInt16 operator / (SqlInt16 x, SqlInt16 y) @@ -379,12 +379,13 @@ namespace System.Data.SqlTypes public static explicit operator SqlInt16 (SqlInt64 x) { - //checked { - if (x.IsNull) - return Null; - else + if (x.IsNull) + return Null; + else { + checked { return new SqlInt16 ((short)x.Value); - // } + } + } } public static explicit operator SqlInt16 (SqlMoney x) @@ -400,13 +401,13 @@ namespace System.Data.SqlTypes public static explicit operator SqlInt16 (SqlSingle x) { - // FIXME - //checked { - if (x.IsNull) - return Null; - else + if (x.IsNull) + return Null; + else { + checked { return new SqlInt16 ((short)x.Value); - //} + } + } } public static explicit operator SqlInt16 (SqlString x) |