diff --git a/main.cpp b/main.cpp index 0193e04..97d1402 100644 --- a/main.cpp +++ b/main.cpp @@ -199,11 +199,11 @@ class Destination { float getMatching(Characteristics & prio) { return prio.getMatching(characteristics); } - static Destination bestMatch(std::vector &v, Characteristics & prio) { + static Destination bestMatch(const std::vector &v, const Characteristics & prio) { float best = 0; Destination ret; for (auto it:v) { - float curr = it.getMatching(prio); + float curr = it.getMatching(const_cast(prio)); if (curr > best) { best = curr; ret = it;