From b71c979a918563e0bcc0456f36be887ef70130b5 Mon Sep 17 00:00:00 2001 From: Gerhard Hoffmann Date: Mon, 6 May 2024 11:36:12 +0200 Subject: [PATCH] Fix: getPaymentOptionIndex() -> return 0 instead of -1 Removed exit(0)-call which was used for testing. --- library/src/configuration.cpp | 10 ++-------- 1 file changed, 2 insertions(+), 8 deletions(-) diff --git a/library/src/configuration.cpp b/library/src/configuration.cpp index 5318529..3cd9b4b 100644 --- a/library/src/configuration.cpp +++ b/library/src/configuration.cpp @@ -478,19 +478,12 @@ bool Configuration::ParseJson(Configuration* cfg, const char* json) } } - qCritical() << "DAY" << dt.day; - qCritical() << "DIR" << dt.direction; - qCritical() << "week" << dt.week; - qCritical() << "DIR" << dt.time; - if (strcmp(inner_obj_name, "pop_min_date_time") == 0) { this->currentPaymentOptions.last().pop_min_date_time = dt; } else if (strcmp(inner_obj_name, "pop_max_date_time") == 0) { this->currentPaymentOptions.last().pop_max_date_time = dt; - exit(0); } - } } } @@ -684,7 +677,8 @@ int Configuration::getPaymentOptionIndex(QDateTime const &dt) const { } } - return -1; + qCritical() << DBG_HEADER << "ERROR: DEFAULT VALUE OF '0' RETURNED AS STATIC VALUE"; + return 0; } ATBSpecialDays Configuration::specialDay(QDateTime const &dt) const {