From 48cc6b1302540e71cdfcb26bfdd041ca214e03ea Mon Sep 17 00:00:00 2001 From: Gerhard Hoffmann Date: Thu, 15 Aug 2024 21:39:22 +0200 Subject: [PATCH] Minor: debug output. duartionUnit as signed int (to see errors in case it becomes negative). --- library/src/calculator_functions.cpp | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/library/src/calculator_functions.cpp b/library/src/calculator_functions.cpp index 12fa03a..0778f4e 100644 --- a/library/src/calculator_functions.cpp +++ b/library/src/calculator_functions.cpp @@ -182,8 +182,8 @@ std::string Calculator::GetDurationFromCost(Configuration* cfg, price = pra_price; } - // qCritical() << DBG_HEADER << " PRICE" << price << "COST" << cost; - // qCritical() << DBG_HEADER << " duration id" << durationId; + //qCritical() << DBG_HEADER << " PRICE" << price << "COST" << cost; + //qCritical() << DBG_HEADER << " duration id" << durationId; auto search = cfg->Duration.find(durationId); if (search != cfg->Duration.end()) { @@ -192,7 +192,9 @@ std::string Calculator::GetDurationFromCost(Configuration* cfg, ATBDuration duration = search->second; if (pop_accumulate_prices) { - uint32_t const durationUnit = cfg->Duration.find(durationId)->second.pun_duration; + int32_t const durationUnit = cfg->Duration.find(durationId)->second.pun_duration; + + // qCritical() << DBG_HEADER << " duration unit" << durationUnit; new_price += pra_price; // qCritical() << "(" << __func__ << ":" << __LINE__ << ") old price" << price << ", new_price:" << new_price; @@ -2789,7 +2791,7 @@ QList &Calculator::GetTimeSteps(Configuration *cfg, int paymentOptionIndex, } } - qCritical() << "(" << __func__ << ":" << __LINE__ << ") NEW timeSteps:" << m_timeSteps; + //qCritical() << "(" << __func__ << ":" << __LINE__ << ") NEW timeSteps:" << m_timeSteps; if (DBG_LEVEL >= DBG_DEBUG) { qCritical() << "(" << __func__ << ":" << __LINE__ << ") NEW timeSteps:" << m_timeSteps;