This is an automated email from the ASF dual-hosted git repository.

nightowl888 pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/lucenenet.git

commit 884a05735339ea98c29762f6b54387f16bf51ef2
Author: Shad Storhaug <[email protected]>
AuthorDate: Tue Feb 16 23:43:09 2021 +0700

    Lucene.Net.Store (ByteArrayDataInput + DataInput): Removed unnecessary 
intermediate cast to ushort
---
 src/Lucene.Net/Store/ByteArrayDataInput.cs | 4 ++--
 src/Lucene.Net/Store/DataInput.cs          | 4 ++--
 2 files changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/Lucene.Net/Store/ByteArrayDataInput.cs 
b/src/Lucene.Net/Store/ByteArrayDataInput.cs
index 8fe9220..562355e 100644
--- a/src/Lucene.Net/Store/ByteArrayDataInput.cs
+++ b/src/Lucene.Net/Store/ByteArrayDataInput.cs
@@ -1,4 +1,4 @@
-using System;
+using System;
 
 namespace Lucene.Net.Store
 {
@@ -93,7 +93,7 @@ namespace Lucene.Net.Store
         /// </summary>
         public override short ReadInt16()
         {
-            return (short)(ushort)(((bytes[pos++] & 0xFF) << 8) | 
(bytes[pos++] & 0xFF));
+            return (short)(((bytes[pos++] & 0xFF) << 8) | (bytes[pos++] & 
0xFF));
         }
 
         /// <summary>
diff --git a/src/Lucene.Net/Store/DataInput.cs 
b/src/Lucene.Net/Store/DataInput.cs
index 64eabc9..4609c9a 100644
--- a/src/Lucene.Net/Store/DataInput.cs
+++ b/src/Lucene.Net/Store/DataInput.cs
@@ -1,4 +1,4 @@
-using Lucene.Net.Diagnostics;
+using Lucene.Net.Diagnostics;
 using System;
 using System.Collections.Generic;
 using System.IO;
@@ -95,7 +95,7 @@ namespace Lucene.Net.Store
         /// <seealso cref="DataOutput.WriteInt16(short)"/>
         public virtual short ReadInt16()
         {
-            return (short)(ushort)(((ReadByte() & 0xFF) << 8) | (ReadByte() & 
0xFF));
+            return (short)(((ReadByte() & 0xFF) << 8) | (ReadByte() & 0xFF));
         }
 
         /// <summary>

Reply via email to