fix: Fixes compiling with .NET 7 SDK (#1176)

This commit is contained in:
Kamron Batman 2022-09-28 21:17:30 -07:00 committed by GitHub
parent 060edaa76a
commit cd5541ec74
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
27 changed files with 106 additions and 1 deletions

View file

@ -316,7 +316,11 @@ public ref struct PooledRefQueue<T>
}
// Increments the index wrapping it if necessary.
#if NET7_SDK
private void MoveNext(scoped ref int index)
#else
private void MoveNext(ref int index)
#endif
{
// It is tempting to use the remainder operator here but it is actually much slower
// than a simple comparison and a rarely taken branch.