Use ternary op rather than lazy and

This commit is contained in:
Ben Adams 2016-11-19 05:10:16 +00:00
parent 8ce47fb8b6
commit 2011a27bde
1 changed files with 2 additions and 4 deletions

View File

@ -258,8 +258,7 @@ namespace Microsoft.AspNetCore.Server.Kestrel.Internal.Infrastructure
return true;
}
// wasLastBlock ? false : TryPeekLongMultiBlock(ref longValue, blockBytes);
return !wasLastBlock && TryPeekLongMultiBlock(ref longValue, blockBytes);
return wasLastBlock ? false : TryPeekLongMultiBlock(ref longValue, blockBytes);
}
[MethodImpl(MethodImplOptions.NoInlining)]
@ -818,8 +817,7 @@ namespace Microsoft.AspNetCore.Server.Kestrel.Internal.Infrastructure
return true;
}
// wasLastBlock ? false : PutMultiBlock(data);
return !wasLastBlock && PutMultiBlock(data);
return wasLastBlock ? false : PutMultiBlock(data);
}
[MethodImpl(MethodImplOptions.NoInlining)]