1
0
mirror of https://github.com/vcmi/vcmi.git synced 2025-11-23 22:37:55 +02:00

Merge branch 'develop' of https://github.com/xilmi/vcmi into develop

This commit is contained in:
Xilmi
2024-09-05 16:22:30 +02:00

View File

@@ -159,8 +159,7 @@ public:
}
else {
// Calculate the number of times we need to accumulate income to fulfill the need
float divisionResult = static_cast<float>(container.at(i)) / static_cast<float>(income[i]);
int ceiledResult = static_cast<int>(std::ceil(divisionResult));
int ceiledResult = vstd::divideAndCeil(container.at(i), income[i]);
ret = std::max(ret, ceiledResult);
}
}