Fix CA2019

This commit is contained in:
RoosterDragon
2023-03-12 17:43:12 +00:00
committed by abcdefg30
parent 321d4b8afd
commit ef04e2e1e8
2 changed files with 4 additions and 1 deletions

View File

@@ -801,6 +801,9 @@ dotnet_diagnostic.CA2016.severity = warning
# The 'count' argument to Buffer.BlockCopy should specify the number of bytes to copy.
dotnet_diagnostic.CA2018.severity = warning
# ThreadStatic fields should not use inline initialization.
dotnet_diagnostic.CA2019.severity = warning
### Security Rules
### https://learn.microsoft.com/en-us/dotnet/fundamentals/code-analysis/quality-rules/security-warnings

View File

@@ -78,7 +78,7 @@ namespace OpenRA.Mods.Common.AudioLoaders
// This buffer can be static because it can only be used by 1 instance per thread.
[ThreadStatic]
static float[] conversionBuffer = null;
static float[] conversionBuffer;
public OggStream(OggFormat format)
{