diff options
Diffstat (limited to 'OpenSim/Framework/Util.cs')
-rw-r--r-- | OpenSim/Framework/Util.cs | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/OpenSim/Framework/Util.cs b/OpenSim/Framework/Util.cs index df7a552..9949ad8 100644 --- a/OpenSim/Framework/Util.cs +++ b/OpenSim/Framework/Util.cs | |||
@@ -194,7 +194,7 @@ namespace OpenSim.Framework | |||
194 | } | 194 | } |
195 | 195 | ||
196 | public static T Clamp<T>(T x, T min, T max) | 196 | public static T Clamp<T>(T x, T min, T max) |
197 | where T : System.IComparable<T> | 197 | where T : IComparable<T> |
198 | { | 198 | { |
199 | return x.CompareTo(max) > 0 ? max : | 199 | return x.CompareTo(max) > 0 ? max : |
200 | x.CompareTo(min) < 0 ? min : | 200 | x.CompareTo(min) < 0 ? min : |
@@ -758,8 +758,8 @@ namespace OpenSim.Framework | |||
758 | memory.Read(compressed, 0, compressed.Length); | 758 | memory.Read(compressed, 0, compressed.Length); |
759 | 759 | ||
760 | byte[] compressedBuffer = new byte[compressed.Length + 4]; | 760 | byte[] compressedBuffer = new byte[compressed.Length + 4]; |
761 | System.Buffer.BlockCopy(compressed, 0, compressedBuffer, 4, compressed.Length); | 761 | Buffer.BlockCopy(compressed, 0, compressedBuffer, 4, compressed.Length); |
762 | System.Buffer.BlockCopy(BitConverter.GetBytes(buffer.Length), 0, compressedBuffer, 0, 4); | 762 | Buffer.BlockCopy(BitConverter.GetBytes(buffer.Length), 0, compressedBuffer, 0, 4); |
763 | return Convert.ToBase64String(compressedBuffer); | 763 | return Convert.ToBase64String(compressedBuffer); |
764 | } | 764 | } |
765 | 765 | ||
@@ -872,9 +872,9 @@ namespace OpenSim.Framework | |||
872 | { | 872 | { |
873 | string os = String.Empty; | 873 | string os = String.Empty; |
874 | 874 | ||
875 | if (System.Environment.OSVersion.Platform != PlatformID.Unix) | 875 | if (Environment.OSVersion.Platform != PlatformID.Unix) |
876 | { | 876 | { |
877 | os = System.Environment.OSVersion.ToString(); | 877 | os = Environment.OSVersion.ToString(); |
878 | } | 878 | } |
879 | else | 879 | else |
880 | { | 880 | { |