From 84782afb7e8c2f80f0242ce99f14aab6fb33252c Mon Sep 17 00:00:00 2001 From: sta Date: Wed, 25 Sep 2019 19:44:44 +0900 Subject: [PATCH] [Modify] Polish it --- websocket-sharp/Ext.cs | 22 +++++++++++----------- 1 file changed, 11 insertions(+), 11 deletions(-) diff --git a/websocket-sharp/Ext.cs b/websocket-sharp/Ext.cs index 5c4c74eb..90ee009d 100644 --- a/websocket-sharp/Ext.cs +++ b/websocket-sharp/Ext.cs @@ -1995,28 +1995,28 @@ namespace WebSocketSharp return default (T); var type = typeof (T); - var buff = source.ToHostOrder (sourceOrder); + var val = source.ToHostOrder (sourceOrder); return type == typeof (Boolean) - ? (T)(object) BitConverter.ToBoolean (buff, 0) + ? (T)(object) BitConverter.ToBoolean (val, 0) : type == typeof (Char) - ? (T)(object) BitConverter.ToChar (buff, 0) + ? (T)(object) BitConverter.ToChar (val, 0) : type == typeof (Double) - ? (T)(object) BitConverter.ToDouble (buff, 0) + ? (T)(object) BitConverter.ToDouble (val, 0) : type == typeof (Int16) - ? (T)(object) BitConverter.ToInt16 (buff, 0) + ? (T)(object) BitConverter.ToInt16 (val, 0) : type == typeof (Int32) - ? (T)(object) BitConverter.ToInt32 (buff, 0) + ? (T)(object) BitConverter.ToInt32 (val, 0) : type == typeof (Int64) - ? (T)(object) BitConverter.ToInt64 (buff, 0) + ? (T)(object) BitConverter.ToInt64 (val, 0) : type == typeof (Single) - ? (T)(object) BitConverter.ToSingle (buff, 0) + ? (T)(object) BitConverter.ToSingle (val, 0) : type == typeof (UInt16) - ? (T)(object) BitConverter.ToUInt16 (buff, 0) + ? (T)(object) BitConverter.ToUInt16 (val, 0) : type == typeof (UInt32) - ? (T)(object) BitConverter.ToUInt32 (buff, 0) + ? (T)(object) BitConverter.ToUInt32 (val, 0) : type == typeof (UInt64) - ? (T)(object) BitConverter.ToUInt64 (buff, 0) + ? (T)(object) BitConverter.ToUInt64 (val, 0) : default (T); }