From 1e46b0da67e310242ef3944b7aa229888902bcaa Mon Sep 17 00:00:00 2001 From: sta Date: Fri, 10 Jan 2025 22:15:05 +0900 Subject: [PATCH] [Modify] Use default type (int) --- websocket-sharp/Ext.cs | 2 +- websocket-sharp/Fin.cs | 2 +- websocket-sharp/Mask.cs | 2 +- websocket-sharp/Opcode.cs | 2 +- websocket-sharp/Rsv.cs | 2 +- websocket-sharp/WebSocketFrame.cs | 2 +- 6 files changed, 6 insertions(+), 6 deletions(-) diff --git a/websocket-sharp/Ext.cs b/websocket-sharp/Ext.cs index 0df7f3c2..e569746c 100644 --- a/websocket-sharp/Ext.cs +++ b/websocket-sharp/Ext.cs @@ -585,7 +585,7 @@ namespace WebSocketSharp || code == 1015; } - internal static bool IsSupportedOpcode (this byte opcode) + internal static bool IsSupportedOpcode (this int opcode) { return Enum.IsDefined (typeof (Opcode), opcode); } diff --git a/websocket-sharp/Fin.cs b/websocket-sharp/Fin.cs index 1c4f2933..36622d7e 100644 --- a/websocket-sharp/Fin.cs +++ b/websocket-sharp/Fin.cs @@ -38,7 +38,7 @@ namespace WebSocketSharp /// /// Section 5.2 of RFC 6455. /// - internal enum Fin : byte + internal enum Fin { /// /// Equivalent to numeric value 0. Indicates more frames of a message follow. diff --git a/websocket-sharp/Mask.cs b/websocket-sharp/Mask.cs index 68b6171c..fb0ef106 100644 --- a/websocket-sharp/Mask.cs +++ b/websocket-sharp/Mask.cs @@ -38,7 +38,7 @@ namespace WebSocketSharp /// /// Section 5.2 of RFC 6455. /// - internal enum Mask : byte + internal enum Mask { /// /// Equivalent to numeric value 0. Indicates not masked. diff --git a/websocket-sharp/Opcode.cs b/websocket-sharp/Opcode.cs index 5a8c632e..e7bdf6ed 100644 --- a/websocket-sharp/Opcode.cs +++ b/websocket-sharp/Opcode.cs @@ -38,7 +38,7 @@ namespace WebSocketSharp /// /// Section 5.2 of RFC 6455. /// - internal enum Opcode : byte + internal enum Opcode { /// /// Equivalent to numeric value 0. Indicates continuation frame. diff --git a/websocket-sharp/Rsv.cs b/websocket-sharp/Rsv.cs index d2a086e5..ee245c3f 100644 --- a/websocket-sharp/Rsv.cs +++ b/websocket-sharp/Rsv.cs @@ -39,7 +39,7 @@ namespace WebSocketSharp /// /// Section 5.2 of RFC 6455. /// - internal enum Rsv : byte + internal enum Rsv { /// /// Equivalent to numeric value 0. Indicates zero. diff --git a/websocket-sharp/WebSocketFrame.cs b/websocket-sharp/WebSocketFrame.cs index 86ce81b9..7d434769 100644 --- a/websocket-sharp/WebSocketFrame.cs +++ b/websocket-sharp/WebSocketFrame.cs @@ -342,7 +342,7 @@ namespace WebSocketSharp var rsv3 = (header[0] & 0x10) == 0x10 ? Rsv.On : Rsv.Off; // Opcode - var opcode = (byte) (header[0] & 0x0f); + var opcode = header[0] & 0x0f; // MASK var mask = (header[1] & 0x80) == 0x80 ? Mask.On : Mask.Off;