Skip to content

Commit e521d11

Browse files
Use new _OR_GREATER defines (#421)
.Net 5.0.200 SDK added support for using _OR_GREATER with runtime version defines, no reason not to use them. Old defines aren't removed since old SDKs don't support this. Documentation: https://github.com/dotnet/designs/blob/main/accepted/2020/or-greater-defines/or-greater-defines.md
1 parent f71c54c commit e521d11

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

LiteNetLib/Utils/CRC32C.cs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
#if NETCOREAPP3_1
1+
#if NETCOREAPP3_0_OR_GREATER || NETCOREAPP3_1
22
using System;
33
using System.Runtime.InteropServices;
44
using System.Runtime.Intrinsics.X86;
@@ -15,7 +15,7 @@ public static class CRC32C
1515

1616
static CRC32C()
1717
{
18-
#if NETCOREAPP3_1
18+
#if NETCOREAPP3_0_OR_GREATER || NETCOREAPP3_1
1919
if(Sse42.IsSupported)
2020
return;
2121
#endif
@@ -42,7 +42,7 @@ static CRC32C()
4242
public static uint Compute(byte[] input, int offset, int length)
4343
{
4444
uint crcLocal = uint.MaxValue;
45-
#if NETCOREAPP3_1
45+
#if NETCOREAPP3_0_OR_GREATER || NETCOREAPP3_1
4646
if (Sse42.IsSupported)
4747
{
4848
var data = new ReadOnlySpan<byte>(input, offset, length);

0 commit comments

Comments
 (0)