From 9debbe17ac120cbe220f08be8559388b3a367052 Mon Sep 17 00:00:00 2001 From: Stefan Nikolei Date: Mon, 9 Jan 2023 07:01:23 +0100 Subject: [PATCH] Add NotNullWhen to TryGetLinearlySeparableComponents --- .../Processors/Convolution/ConvolutionProcessorHelpers.cs | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/ImageSharp/Processing/Processors/Convolution/ConvolutionProcessorHelpers.cs b/src/ImageSharp/Processing/Processors/Convolution/ConvolutionProcessorHelpers.cs index 411dbe50cb..4aefa0daef 100644 --- a/src/ImageSharp/Processing/Processors/Convolution/ConvolutionProcessorHelpers.cs +++ b/src/ImageSharp/Processing/Processors/Convolution/ConvolutionProcessorHelpers.cs @@ -1,6 +1,8 @@ // Copyright (c) Six Labors. // Licensed under the Six Labors Split License. +using System.Diagnostics.CodeAnalysis; + namespace SixLabors.ImageSharp.Processing.Processors.Convolution; internal static class ConvolutionProcessorHelpers @@ -98,7 +100,7 @@ internal static class ConvolutionProcessorHelpers /// The resulting 1D row vector, if possible. /// The resulting 1D column vector, if possible. /// Whether or not was linearly separable. - public static bool TryGetLinearlySeparableComponents(this DenseMatrix matrix, out float[]? row, out float[]? column) + public static bool TryGetLinearlySeparableComponents(this DenseMatrix matrix, [NotNullWhen(true)] out float[]? row, [NotNullWhen(true)] out float[]? column) { int height = matrix.Rows; int width = matrix.Columns;