Removed excessive init in HeapIndirectPriorityQueue constructor

This commit is contained in:
Stanislav Kashirin 2022-06-11 18:50:48 +03:00
parent b813824933
commit 3d62851c70

View file

@ -51,9 +51,6 @@ public class HEAP_INDIRECT_PRIORITY_QUEUE KEY_GENERIC extends HEAP_SEMI_INDIRECT
*/
public HEAP_INDIRECT_PRIORITY_QUEUE(KEY_GENERIC_TYPE[] refArray, int capacity, KEY_COMPARATOR KEY_SUPER_GENERIC c) {
super(refArray, capacity, c);
if (capacity > 0) this.heap = new int[capacity];
this.c = c;
this.inv = new int[refArray.length];
Arrays.fill(inv, -1);