From 036af516ec7c82edbd9aec6003bac89ea18927c4 Mon Sep 17 00:00:00 2001 From: Sergio Pedri Date: Tue, 13 Aug 2024 17:33:03 -0700 Subject: [PATCH] Fix new .NET analyzer warnings --- .../SyntaxRewriters/HlslSourceRewriter.cs | 2 +- .../Controls/AnimatedComputeShaderPanel.Properties.cs | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/ComputeSharp.SourceGeneration.Hlsl/SyntaxRewriters/HlslSourceRewriter.cs b/src/ComputeSharp.SourceGeneration.Hlsl/SyntaxRewriters/HlslSourceRewriter.cs index 98e79d17..c9da9124 100644 --- a/src/ComputeSharp.SourceGeneration.Hlsl/SyntaxRewriters/HlslSourceRewriter.cs +++ b/src/ComputeSharp.SourceGeneration.Hlsl/SyntaxRewriters/HlslSourceRewriter.cs @@ -196,7 +196,7 @@ internal abstract partial class HlslSourceRewriter( } /// - public sealed unsafe override SyntaxNode? VisitLiteralExpression(LiteralExpressionSyntax node) + public sealed override unsafe SyntaxNode? VisitLiteralExpression(LiteralExpressionSyntax node) { CancellationToken.ThrowIfCancellationRequested(); diff --git a/src/ComputeSharp.WinUI/Controls/AnimatedComputeShaderPanel.Properties.cs b/src/ComputeSharp.WinUI/Controls/AnimatedComputeShaderPanel.Properties.cs index 79e84861..2bc9e6d8 100644 --- a/src/ComputeSharp.WinUI/Controls/AnimatedComputeShaderPanel.Properties.cs +++ b/src/ComputeSharp.WinUI/Controls/AnimatedComputeShaderPanel.Properties.cs @@ -188,7 +188,7 @@ partial class AnimatedComputeShaderPanel AnimatedComputeShaderPanel @this = (AnimatedComputeShaderPanel)d; if (@this.IsLoaded && - (bool)e.NewValue is false && + !(bool)e.NewValue && @this.ShaderRunner is IShaderRunner shaderRunner) { @this.swapChainManager.StartRenderLoop(null, shaderRunner);