From 61bfb9e60cc2eb75f7fa18561c046b9c4bdf1fe5 Mon Sep 17 00:00:00 2001 From: Anton Firszov Date: Fri, 19 Nov 2021 11:07:56 +0100 Subject: [PATCH] add comment on ColorDistanceCache member --- .../Processors/Quantization/EuclideanPixelMap{TPixel}.cs | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/ImageSharp/Processing/Processors/Quantization/EuclideanPixelMap{TPixel}.cs b/src/ImageSharp/Processing/Processors/Quantization/EuclideanPixelMap{TPixel}.cs index cac11b4a8..f54489348 100644 --- a/src/ImageSharp/Processing/Processors/Quantization/EuclideanPixelMap{TPixel}.cs +++ b/src/ImageSharp/Processing/Processors/Quantization/EuclideanPixelMap{TPixel}.cs @@ -22,6 +22,8 @@ namespace SixLabors.ImageSharp.Processing.Processors.Quantization where TPixel : unmanaged, IPixel { private Rgba32[] rgbaPalette; + + // Do not make this readonly! Struct value would be always copied on non-readonly method calls. private ColorDistanceCache cache; private readonly Configuration configuration;