1
0
Fork 0
mirror of https://github.com/pgpainless/pgpainless.git synced 2024-06-25 04:54:49 +02:00

Add empty construcor to Paths

This commit is contained in:
Paul Schaub 2023-06-28 20:03:19 +02:00
parent 0eefd29446
commit 18f2e420be
Signed by: vanitasvitae
GPG key ID: 62BEE9264BF17311

View file

@ -6,6 +6,9 @@ package org.pgpainless.wot.dijkstra.sq
class Paths(val paths: MutableList<Item>) {
constructor():
this(mutableListOf<Item>())
fun add(path: Path, amount: Int) {
require(amount <= path.amount) {
"Amount too small. TODO: Better error message"