From 59ac0a0d0a99e91a75d18a3884ae276309370997 Mon Sep 17 00:00:00 2001 From: Garret Rieger Date: Thu, 5 Nov 2020 10:29:56 -0800 Subject: [PATCH] [subset] Use priority for comparison in heap. --- src/hb-priority-queue.hh | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/hb-priority-queue.hh b/src/hb-priority-queue.hh index 68b17fdc6..e47127edb 100644 --- a/src/hb-priority-queue.hh +++ b/src/hb-priority-queue.hh @@ -111,11 +111,11 @@ struct hb_priority_queue_t return; bool has_right = right < heap.length; - if (heap[index] <= heap[left] - && (!has_right || heap[index] <= heap[right])) + if (heap[index].second <= heap[left].second + && (!has_right || heap[index].second <= heap[right].second)) return; - if (!has_right || heap[left] < heap[right]) + if (!has_right || heap[left].second < heap[right].second) { swap (index, left); bubble_down (left);