From b035f4f887a029b0821475e108c8ff47ba229da5 Mon Sep 17 00:00:00 2001 From: Gerhard Hoffmann Date: Fri, 27 Sep 2024 14:17:35 +0200 Subject: [PATCH] Calculator::GetDurationFromCost(): Minor: move scope of some variables upward. --- library/src/calculator_functions.cpp | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/library/src/calculator_functions.cpp b/library/src/calculator_functions.cpp index 73459dc..ba1c1c0 100644 --- a/library/src/calculator_functions.cpp +++ b/library/src/calculator_functions.cpp @@ -708,8 +708,11 @@ Calculator::GetDurationFromCost(Configuration* cfg, int const pop_id = cfg->getPaymentOptions(paymentOptionIndex).pop_id; int const pop_max_price = cfg->getPaymentOptions(paymentOptionIndex).pop_max_price; + //int const pop_max_time = cfg->getPaymentOptions(paymentOptionIndex).pop_max_time; int const pop_min_price = cfg->getPaymentOptions(paymentOptionIndex).pop_min_price; int const pop_allow_overpay = cfg->getPaymentOptions(paymentOptionIndex).pop_allow_overpay; + int const pop_accumulate_prices = cfg->getPaymentOptions(paymentOptionIndex).pop_accumulate_prices; + int price = 0; if (cost == pop_max_price) { qCritical() << DBG_HEADER << "SUCCESS MAX-PARKING-PRICE" << pop_max_price << ", COST" << cost; @@ -847,9 +850,9 @@ Calculator::GetDurationFromCost(Configuration* cfg, qCritical() << DBG_HEADER << " CURRENT WORKING-TIME-TO" << current_working_time_to.toString(Qt::ISODate); #endif - int const pop_accumulate_prices = cfg->getPaymentOptions(paymentOptionIndex).pop_accumulate_prices; + // int const pop_accumulate_prices = cfg->getPaymentOptions(paymentOptionIndex).pop_accumulate_prices; // int const pop_accumulate_durations = cfg->getPaymentOptions(paymentOptionIndex).pop_accumulate_durations; - int price = 0; + // int price = 0; int new_price = 0; int durationInSecs = 0; uint32_t duration_previous = 0;