File tree 1 file changed +2
-2
lines changed
src/libraries/System.Private.CoreLib/src/System/Collections/Generic 1 file changed +2
-2
lines changed Original file line number Diff line number Diff line change @@ -453,7 +453,7 @@ public bool MoveNext()
453
453
454
454
// Cache some fields in locals to decrease code size
455
455
T [ ] array = _q . _array ;
456
- int capacity = array . Length ;
456
+ uint capacity = ( uint ) array . Length ;
457
457
458
458
// _index represents the 0-based index into the queue, however the queue
459
459
// doesn't have to start from 0 and it may not even be stored contiguously in memory.
@@ -467,7 +467,7 @@ public bool MoveNext()
467
467
// Replacing it with simple comparison/subtraction operations sped up
468
468
// the average foreach loop by 2x.
469
469
470
- arrayIndex -= ( uint ) capacity ; // wrap around if needed
470
+ arrayIndex -= capacity ; // wrap around if needed
471
471
}
472
472
473
473
_currentElement = array [ arrayIndex ] ;
You can’t perform that action at this time.
0 commit comments