@@ -111,7 +111,7 @@ public WuQuantizer(Configuration configuration, QuantizerOptions options)
111111 public QuantizerOptions Options { get ; }
112112
113113 /// <inheritdoc/>
114- public ReadOnlyMemory < TPixel > Palette
114+ public readonly ReadOnlyMemory < TPixel > Palette
115115 {
116116 get
117117 {
@@ -362,7 +362,7 @@ private static Moment Top(ref Box cube, int direction, int position, ReadOnlySpa
362362 /// </summary>
363363 /// <param name="source">The source data.</param>
364364 /// <param name="bounds">The bounds within the source image to quantize.</param>
365- private void Build3DHistogram ( Buffer2D < TPixel > source , Rectangle bounds )
365+ private readonly void Build3DHistogram ( Buffer2D < TPixel > source , Rectangle bounds )
366366 {
367367 Span < Moment > momentSpan = this . momentsOwner . GetSpan ( ) ;
368368
@@ -393,7 +393,7 @@ private void Build3DHistogram(Buffer2D<TPixel> source, Rectangle bounds)
393393 /// Converts the histogram into moments so that we can rapidly calculate the sums of the above quantities over any desired box.
394394 /// </summary>
395395 /// <param name="allocator">The memory allocator used for allocating buffers.</param>
396- private void Get3DMoments ( MemoryAllocator allocator )
396+ private readonly void Get3DMoments ( MemoryAllocator allocator )
397397 {
398398 using IMemoryOwner < Moment > volume = allocator . Allocate < Moment > ( IndexCount * IndexAlphaCount ) ;
399399 using IMemoryOwner < Moment > area = allocator . Allocate < Moment > ( IndexAlphaCount ) ;
@@ -462,7 +462,7 @@ private void Get3DMoments(MemoryAllocator allocator)
462462 /// </summary>
463463 /// <param name="cube">The cube.</param>
464464 /// <returns>The <see cref="float"/>.</returns>
465- private double Variance ( ref Box cube )
465+ private readonly double Variance ( ref Box cube )
466466 {
467467 ReadOnlySpan < Moment > momentSpan = this . momentsOwner . GetSpan ( ) ;
468468
@@ -503,7 +503,7 @@ private double Variance(ref Box cube)
503503 /// <param name="cut">The cutting point.</param>
504504 /// <param name="whole">The whole moment.</param>
505505 /// <returns>The <see cref="float"/>.</returns>
506- private float Maximize ( ref Box cube , int direction , int first , int last , out int cut , Moment whole )
506+ private readonly float Maximize ( ref Box cube , int direction , int first , int last , out int cut , Moment whole )
507507 {
508508 ReadOnlySpan < Moment > momentSpan = this . momentsOwner . GetSpan ( ) ;
509509 Moment bottom = Bottom ( ref cube , direction , momentSpan ) ;
@@ -634,7 +634,7 @@ private bool Cut(ref Box set1, ref Box set2)
634634 /// </summary>
635635 /// <param name="cube">The cube.</param>
636636 /// <param name="label">A label.</param>
637- private void Mark ( ref Box cube , byte label )
637+ private readonly void Mark ( ref Box cube , byte label )
638638 {
639639 Span < byte > tagSpan = this . tagsOwner . GetSpan ( ) ;
640640
0 commit comments