From d29f8b55432292f08282233ba6ce0d057fddec20 Mon Sep 17 00:00:00 2001 From: sta Date: Wed, 24 Jul 2019 21:08:04 +0900 Subject: [PATCH] [Modify] Polish it --- websocket-sharp/Ext.cs | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/websocket-sharp/Ext.cs b/websocket-sharp/Ext.cs index 9e1fb8f7..2d259566 100644 --- a/websocket-sharp/Ext.cs +++ b/websocket-sharp/Ext.cs @@ -570,13 +570,15 @@ namespace WebSocketSharp return unquote ? val.Unquote () : val; } - internal static byte[] InternalToByteArray (this ushort value, ByteOrder order) + internal static byte[] InternalToByteArray ( + this ushort value, ByteOrder order + ) { - var bytes = BitConverter.GetBytes (value); + var ret = BitConverter.GetBytes (value); if (!order.IsHostOrder ()) - Array.Reverse (bytes); + Array.Reverse (ret); - return bytes; + return ret; } internal static byte[] InternalToByteArray (this ulong value, ByteOrder order)