Copilot commented on code in PR #1121:
URL: https://github.com/apache/lucenenet/pull/1121#discussion_r2354140531


##########
src/Lucene.Net/Support/Arrays.cs:
##########
@@ -389,7 +391,7 @@ public void Copy(short[] sourceArray, int sourceIndex, 
short[] destinationArray,
                 {
                     fixed (short* sourcePointer = &sourceArray[sourceIndex], 
destinationPointer = &destinationArray[destinationIndex])
                     {
-                        int size = sizeof(short);
+                        const int size = sizeof(short);

Review Comment:
   Using `const` instead of `int` for sizeof expressions is good practice as 
sizeof is a compile-time constant. However, ensure this pattern is consistently 
applied across all similar methods in the class.



-- 
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: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to