1
0
mirror of https://github.com/vcmi/vcmi.git synced 2024-12-14 10:12:59 +02:00

Update ResourceSet.h

Use a more descriptive method name and add comment of what it does.
This commit is contained in:
Xilmi 2024-09-05 16:30:15 +02:00
parent 51b9d16291
commit 79531c8596

View File

@ -148,7 +148,8 @@ public:
return ret;
}
int div(const ResourceSet& income) {
//Returns how many items of "this" we can afford with provided income
int maxPurchasableCount(const ResourceSet& income) {
int ret = 0; // Initialize to 0 because we want the maximum number of accumulations
for (size_t i = 0; i < container.size(); ++i) {