mirror of
https://github.com/vcmi/vcmi.git
synced 2025-11-25 22:42:04 +02:00
Update lib/ResourceSet.h
Use suggestion. Co-authored-by: Ivan Savenko <saven.ivan@gmail.com>
This commit is contained in:
@@ -159,8 +159,7 @@ public:
|
|||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
// Calculate the number of times we need to accumulate income to fulfill the need
|
// 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 = vstd::divideAndCeil(container.at(i), income[i]);
|
||||||
int ceiledResult = static_cast<int>(std::ceil(divisionResult));
|
|
||||||
ret = std::max(ret, ceiledResult);
|
ret = std::max(ret, ceiledResult);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user