1
0
Fork 0
mirror of https://github.com/pgpainless/pgpainless.git synced 2024-11-15 17:02:06 +01:00

Add empty construcor to Paths

This commit is contained in:
Paul Schaub 2023-06-28 20:03:19 +02:00
parent 2555893b19
commit 5341279d1f
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"