Replace max_parking_time with parking_time_max

This commit is contained in:
Gerhard Hoffmann 2023-01-24 10:08:03 +01:00
parent 185b732212
commit 62494a2c27

View File

@ -77,10 +77,10 @@ static bool checkCalculatePreConditions(parking_tariff_t const* tariff,
return false;
}
if (tariff->max_parking_time != -1) {
if (parkingTime > tariff->max_parking_time) {
if (tariff->parking_time_max != -1) {
if (parkingTime > tariff->parking_time_max) {
qCritical() << "parkingTime" << parkingTime
<< ">" << tariff->max_parking_time;
<< ">" << tariff->parking_time_max;
return false;
}
}
@ -286,7 +286,7 @@ bool compute_duration_for_parking_ticket(parking_tariff_t const *tariff,
minute_t *end_parking_time,
struct price_t const *price) {
price_t p;
for (int i = 0; i < tariff->max_parking_time; ++i) {
for (int i = 0; i < tariff->parking_time_max; ++i) {
minute_t end_time = start_parking_time + i;
if (compute_price_for_parking_ticket(tariff, start_parking_time,
end_time, &p)) {