From af07fc3958383f81b78ce7796f2c6393d900efd2 Mon Sep 17 00:00:00 2001 From: James Jackson-South Date: Sat, 19 Mar 2016 16:58:59 +1100 Subject: [PATCH] Cleanup Former-commit-id: 49673492818d8855ffd3da553d6f2950f49b41ab Former-commit-id: 4d3cab5c2e711dc5762b14cd3c06353c6db1eb3e Former-commit-id: 720837a9bd59896031eccd8cef78504a621a6daa --- .../Quantizers/Octree/OctreeQuantizer.cs | 15 +++------------ 1 file changed, 3 insertions(+), 12 deletions(-) diff --git a/src/ImageProcessorCore/Quantizers/Octree/OctreeQuantizer.cs b/src/ImageProcessorCore/Quantizers/Octree/OctreeQuantizer.cs index c956651740..1ef4cd541c 100644 --- a/src/ImageProcessorCore/Quantizers/Octree/OctreeQuantizer.cs +++ b/src/ImageProcessorCore/Quantizers/Octree/OctreeQuantizer.cs @@ -149,11 +149,6 @@ namespace ImageProcessorCore.Quantizers /// private readonly int maxColorBits; - /// - /// Number of leaves in the tree - /// - private int leafCount; - /// /// Store the last node quantized /// @@ -173,7 +168,7 @@ namespace ImageProcessorCore.Quantizers public Octree(int maxColorBits) { this.maxColorBits = maxColorBits; - this.leafCount = 0; + this.Leaves = 0; this.reducibleNodes = new OctreeNode[9]; this.root = new OctreeNode(0, this.maxColorBits, this); this.previousColor = 0; @@ -183,11 +178,7 @@ namespace ImageProcessorCore.Quantizers /// /// Gets or sets the number of leaves in the tree /// - public int Leaves - { - get { return this.leafCount; } - set { this.leafCount = value; } - } + private int Leaves { get; set; } /// /// Gets the array of reducible nodes @@ -292,7 +283,7 @@ namespace ImageProcessorCore.Quantizers this.reducibleNodes[index] = node.NextReducible; // Decrement the leaf count after reducing the node - this.leafCount -= node.Reduce(); + this.Leaves -= node.Reduce(); // And just in case I've reduced the last color to be added, and the next color to // be added is the same, invalidate the previousNode...