From 8cbdf96c17086fc4ae5591d35641bee258a26013 Mon Sep 17 00:00:00 2001 From: Paul Irwin Date: Sun, 3 Nov 2024 15:27:54 -0700 Subject: [PATCH] Remove unnecessary parentheses --- src/Lucene.Net/Util/FixedBitSet.cs | 4 ++-- src/Lucene.Net/Util/OpenBitSet.cs | 6 +++--- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/src/Lucene.Net/Util/FixedBitSet.cs b/src/Lucene.Net/Util/FixedBitSet.cs index 8c878d3c20..9ae368bd92 100644 --- a/src/Lucene.Net/Util/FixedBitSet.cs +++ b/src/Lucene.Net/Util/FixedBitSet.cs @@ -602,7 +602,7 @@ public void Flip(int startIndex, int endIndex) */ long startmask = -1L << startIndex; - long endmask = (-1L) >>> -endIndex; // 64-(endIndex&0x3f) is the same as -endIndex due to wrap + long endmask = -1L >>> -endIndex; // 64-(endIndex&0x3f) is the same as -endIndex due to wrap if (startWord == endWord) { @@ -641,7 +641,7 @@ public void Set(int startIndex, int endIndex) int endWord = (endIndex - 1) >> 6; long startmask = -1L << startIndex; - long endmask = (-1L) >>> -endIndex; // 64-(endIndex&0x3f) is the same as -endIndex due to wrap + long endmask = -1L >>> -endIndex; // 64-(endIndex&0x3f) is the same as -endIndex due to wrap if (startWord == endWord) { diff --git a/src/Lucene.Net/Util/OpenBitSet.cs b/src/Lucene.Net/Util/OpenBitSet.cs index 40227ce2c7..a95c5a6eac 100644 --- a/src/Lucene.Net/Util/OpenBitSet.cs +++ b/src/Lucene.Net/Util/OpenBitSet.cs @@ -418,8 +418,8 @@ public virtual void Clear(int startIndex, int endIndex) // LUCENENET TODO: API: // word to be changed. int endWord = ((endIndex - 1) >> 6); - long startmask = (-1L) << startIndex; // -1 << (startIndex mod 64) - long endmask = (-1L) << endIndex; // -1 << (endIndex mod 64) + long startmask = -1L << startIndex; // -1 << (startIndex mod 64) + long endmask = -1L << endIndex; // -1 << (endIndex mod 64) if ((endIndex & 0x3f) == 0) { endmask = 0; @@ -466,7 +466,7 @@ public virtual void Clear(long startIndex, long endIndex) // LUCENENET TODO: API int endWord = (int)((endIndex - 1) >> 6); long startmask = -1L << (int)startIndex; - long endmask = (-1L) >>> ((int)-endIndex); // 64-(endIndex&0x3f) is the same as -endIndex due to wrap + long endmask = -1L >>> (int)-endIndex; // 64-(endIndex&0x3f) is the same as -endIndex due to wrap // invert masks since we are clearing startmask = ~startmask;