NightOwl888 commented on code in PR #1007:
URL: https://github.com/apache/lucenenet/pull/1007#discussion_r1826935488


##########
src/Lucene.Net/Util/FixedBitSet.cs:
##########
@@ -641,7 +641,7 @@ public void Set(int startIndex, int endIndex)
             int endWord = (endIndex - 1) >> 6;
 
             long startmask = -1L << startIndex;
-            long endmask = (-1L).TripleShift(-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

Review Comment:
   The parentheses were added here to ensure the correct value (including the - 
sign) was passed to `TripleShift()`. They weren't in the original code. If we 
can get by without them, they can be removed.
   
   
https://github.com/apache/lucene/blob/releases/lucene-solr/4.8.0/lucene/core/src/java/org/apache/lucene/util/FixedBitSet.java#L531
   



##########
src/Lucene.Net/Util/OpenBitSet.cs:
##########
@@ -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).TripleShift((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

Review Comment:
   The parentheses were added here to ensure the correct value (including the - 
sign) was passed to `TripleShift()`. They weren't in the original code. If we 
can get by without them, they can be removed.
   
   
https://github.com/apache/lucene/blob/releases/lucene-solr/4.8.0/lucene/core/src/java/org/apache/lucene/util/OpenBitSet.java#L362



##########
src/Lucene.Net/Util/FixedBitSet.cs:
##########
@@ -602,7 +602,7 @@ public void Flip(int startIndex, int endIndex)
             */
 
             long startmask = -1L << startIndex;
-            long endmask = (-1L).TripleShift(-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

Review Comment:
   The parentheses were added here to ensure the correct value (including the - 
sign) was passed to `TripleShift()`. They weren't in the original code. If we 
can get by without them, they can be removed.
   
   
https://github.com/apache/lucene/blob/releases/lucene-solr/4.8.0/lucene/core/src/java/org/apache/lucene/util/FixedBitSet.java#L499
   



##########
src/Lucene.Net/Util/Packed/BulkOperationPacked12.cs:
##########
@@ -1,7 +1,5 @@
 // this file has been automatically generated, DO NOT EDIT

Review Comment:
   Not applicable to this PR, but perhaps we should look into generating these 
as it was upstream so there is less code to maintain.



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: dev-unsubscr...@lucenenet.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org

Reply via email to