On Tue, Mar 9, 2010 at 13:08, Ulf Zibis <ulf.zi...@gmx.de> wrote: > > [1] current PriorityQueue snippet: > ... > int newCapacity = ((oldCapacity < 64)? > ((oldCapacity + 1) * 2): > ((oldCapacity / 2) * 3)); > ... > [2] new PriorityQueue snippet: > ... > int newCapacity += (oldCapacity < 64) ? > oldCapacity : oldCapacity / 2; > ...
Thanks, I took your suggestion and changed it to: int newCapacity = oldCapacity + ((oldCapacity < 64) ? (oldCapacity + 2) : (oldCapacity >> 1)); Martin