diff options
author | Jan Kotas <jkotas@microsoft.com> | 2016-01-25 09:06:42 -0800 |
---|---|---|
committer | Jan Kotas <jkotas@microsoft.com> | 2016-01-25 09:06:42 -0800 |
commit | d2bce9e658c394693f89d00b34f637a70e67362b (patch) | |
tree | b74b6e0098829e1ede3b1bcf9697b269754f0983 | |
parent | 77446bd601dc1fe7f3d7e927b2c6cd312acfd3f4 (diff) | |
parent | f14d4f4d43b94168409f60b06007cbf009bb3e5b (diff) | |
download | coreclr-d2bce9e658c394693f89d00b34f637a70e67362b.tar.gz coreclr-d2bce9e658c394693f89d00b34f637a70e67362b.tar.bz2 coreclr-d2bce9e658c394693f89d00b34f637a70e67362b.zip |
Merge pull request #2843 from hughbe/bitconverter-comments
Remove irrelevant endianness comment, fix #834
-rw-r--r-- | src/mscorlib/src/System/BitConverter.cs | 16 |
1 files changed, 1 insertions, 15 deletions
diff --git a/src/mscorlib/src/System/BitConverter.cs b/src/mscorlib/src/System/BitConverter.cs index f66d710160..a45b3632a4 100644 --- a/src/mscorlib/src/System/BitConverter.cs +++ b/src/mscorlib/src/System/BitConverter.cs @@ -411,7 +411,7 @@ namespace System { public static String ToString (byte [] value, int startIndex) { if (value == null) throw new ArgumentNullException("value"); - Contract.Ensures(Contract.Result<String>() != null); + Contract.Ensures(Contract.Result<String>() != null); Contract.EndContractBlock(); return ToString(value, startIndex, value.Length - startIndex); } @@ -439,26 +439,12 @@ namespace System { [SecuritySafeCritical] public static unsafe long DoubleToInt64Bits(double value) { - // If we're on a big endian machine, what should this method do? You could argue for - // either big endian or little endian, depending on whether you are writing to a file that - // should be used by other programs on that processor, or for compatibility across multiple - // formats. Because this is ambiguous, we're excluding this from the Portable Library & Win8 Profile. - // If we ever run on big endian machines, produce two versions where endianness is specified. - Contract.Assert(IsLittleEndian, "This method is implemented assuming little endian with an ambiguous spec."); return *((long *)&value); } [SecuritySafeCritical] public static unsafe double Int64BitsToDouble(long value) { - // If we're on a big endian machine, what should this method do? You could argue for - // either big endian or little endian, depending on whether you are writing to a file that - // should be used by other programs on that processor, or for compatibility across multiple - // formats. Because this is ambiguous, we're excluding this from the Portable Library & Win8 Profile. - // If we ever run on big endian machines, produce two versions where endianness is specified. - Contract.Assert(IsLittleEndian, "This method is implemented assuming little endian with an ambiguous spec."); return *((double*)&value); } } - - } |