From 39d5838adc5957f1b2c029311d64db8bc0c133e5 Mon Sep 17 00:00:00 2001 From: Yevhen Kozirovskyi Date: Sun, 19 Jan 2025 17:58:04 +0000 Subject: [PATCH] =?UTF-8?q?=D0=9E=D0=B1=D0=BD=D0=BE=D0=B2=D0=B8=D1=82?= =?UTF-8?q?=D1=8C=20sk1/compressor.c?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- sk1/compressor.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/sk1/compressor.c b/sk1/compressor.c index f418523..ce8f33c 100644 --- a/sk1/compressor.c +++ b/sk1/compressor.c @@ -44,10 +44,10 @@ void swapMinHeapNode(struct MinHeapNode** a, struct MinHeapNode** b) { } // MinHeapify function -void minHeapify(struct MinHeap* minHeap, int idx) { - unsigned smallest = idx; // Преобразуем в unsigned - unsigned left = 2 * idx + 1; // Преобразуем в unsigned - unsigned right = 2 * idx + 2; // Преобразуем в unsigned +void minHeapify(struct MinHeap* minHeap, unsigned idx) { + unsigned smallest = idx; // Changed to unsigned + unsigned left = 2 * idx + 1; // Changed to unsigned + unsigned right = 2 * idx + 2; // Changed to unsigned if (left < minHeap->size && minHeap->array[left]->freq < minHeap->array[smallest]->freq) smallest = left;