From 2f61d94e37c9f7a954c0f48c4bb47ba0db80f419 Mon Sep 17 00:00:00 2001 From: James Jackson-South Date: Tue, 17 Oct 2023 10:25:50 +1000 Subject: [PATCH] Update src/ImageSharp/Formats/Webp/Lossless/HistogramEncoder.cs Co-authored-by: Anton Firszov --- src/ImageSharp/Formats/Webp/Lossless/HistogramEncoder.cs | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/ImageSharp/Formats/Webp/Lossless/HistogramEncoder.cs b/src/ImageSharp/Formats/Webp/Lossless/HistogramEncoder.cs index 6c2d18a919..3a96362cfd 100644 --- a/src/ImageSharp/Formats/Webp/Lossless/HistogramEncoder.cs +++ b/src/ImageSharp/Formats/Webp/Lossless/HistogramEncoder.cs @@ -383,8 +383,7 @@ internal static class HistogramEncoder idx2 = mappings[idx2]; // Calculate cost reduction on combination. - double currCost = 0; - currCost = HistoPriorityListPush(histoPriorityList, maxSize, histograms, idx1, idx2, bestCost, stats, bitsEntropy); + double currCost = HistoPriorityListPush(histoPriorityList, maxSize, histograms, idx1, idx2, bestCost, stats, bitsEntropy); // Found a better pair? if (currCost < 0)