From 2a21a1ca1840b41367a1c9518b1254fe9793b4fe Mon Sep 17 00:00:00 2001 From: Leijurv Date: Sat, 24 Nov 2018 12:53:09 -0800 Subject: [PATCH] simplify --- src/tenor/java/tenor/QuantizedTaskPriorityAllocationCache.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/tenor/java/tenor/QuantizedTaskPriorityAllocationCache.java b/src/tenor/java/tenor/QuantizedTaskPriorityAllocationCache.java index 5ec20e547..531ce56c7 100644 --- a/src/tenor/java/tenor/QuantizedTaskPriorityAllocationCache.java +++ b/src/tenor/java/tenor/QuantizedTaskPriorityAllocationCache.java @@ -45,7 +45,7 @@ public abstract class QuantizedTaskPriorityAllocationCache extends QuantizedTask Allocation alloc = new Allocation(amount); List children = childTasks(); if (children.size() < 2) { - return new Allocation(amount).distributeEqually(); // 0 or 1 cannot be anything but equal distribution + return alloc.distributeEqually(); // 0 or 1 cannot be anything but equal distribution } double[] costs = new double[children.size()]; for (int i = 0; i < costs.length; i++) {