From 356e3be17849379cb4e76689beef04513eae9821 Mon Sep 17 00:00:00 2001 From: Gerhard Hoffmann Date: Mon, 29 Jul 2024 11:22:22 +0200 Subject: [PATCH] Pass PERMIT_TYPE to get_minimal_parkingtime() and get_maximal_parkingtime() to override default parameter value. --- library/src/calculate_price.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/library/src/calculate_price.cpp b/library/src/calculate_price.cpp index cbfb699..10ff1f5 100644 --- a/library/src/calculate_price.cpp +++ b/library/src/calculate_price.cpp @@ -211,8 +211,8 @@ int CALCULATE_LIBRARY_API compute_product_price(Configuration const *cfg, if (product.size() > 0) { if (productStart && productEnd) { - int pop_min_time = get_minimal_parkingtime(cfg); // in minutes - int pop_max_time = get_maximal_parkingtime(cfg); // in minutes + int pop_min_time = get_minimal_parkingtime(cfg, PERMIT_TYPE::TWENTY_FOUR_HOURS_TICKET); // in minutes + int pop_max_time = get_maximal_parkingtime(cfg, PERMIT_TYPE::TWENTY_FOUR_HOURS_TICKET); // in minutes if (pop_max_time >= pop_min_time) { *productStart = start; *productEnd = start.addSecs(pop_max_time*60);