mirror of
https://github.com/vcmi/vcmi.git
synced 2025-01-16 02:47:36 +02:00
Update lib/ResourceSet.h
Use suggestion. Co-authored-by: Ivan Savenko <saven.ivan@gmail.com>
This commit is contained in:
parent
b32c9615ed
commit
07afb2d649
@ -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);
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user