[priority-queue] Use resize instead of shrink

To avoid reallocation of smaller array. Not desirable here.
This commit is contained in:
Behdad Esfahbod 2023-01-05 14:38:10 -07:00
parent 8a17cc4ecf
commit 097fb8b8aa
1 changed files with 1 additions and 1 deletions

View File

@ -62,7 +62,7 @@ struct hb_priority_queue_t
item_t result = heap.arrayZ[0];
heap.arrayZ[0] = heap.arrayZ[heap.length - 1];
heap.shrink (heap.length - 1);
heap.resize (heap.length - 1);
if (!is_empty ())
bubble_down (0);