Fix -Wshorten-64-to-32: team.hpp
There's not that many hexes on a maximally-sized map, so it's a safe assumption that this can cast to int. Commit message by: Octalot
This commit is contained in:
parent
b1cf5a3f27
commit
31e23d2d7e
1 changed files with 2 additions and 2 deletions
|
@ -181,14 +181,14 @@ public:
|
|||
int recall_cost() const { return info_.recall_cost; }
|
||||
void set_village_gold(int income) { info_.income_per_village = income; }
|
||||
void set_recall_cost(int cost) { info_.recall_cost = cost; }
|
||||
int total_income() const { return base_income() + villages_.size() * info_.income_per_village; }
|
||||
int total_income() const { return base_income() + static_cast<int>(villages_.size()) * info_.income_per_village; }
|
||||
/** @return The number of unit levels each village can support,
|
||||
i.e. how much upkeep each village can bear. */
|
||||
int village_support() const { return info_.support_per_village; }
|
||||
/** @param support The number of unit levels each village can support */
|
||||
void set_village_support(int support) { info_.support_per_village = support; }
|
||||
/** Calculate total support capacity, based on support_per_village. */
|
||||
int support() const { return villages_.size()*village_support(); }
|
||||
int support() const { return static_cast<int>(villages_.size()) * village_support(); }
|
||||
void new_turn() { gold_ += total_income(); }
|
||||
void get_shared_maps();
|
||||
void set_gold(int amount) { gold_ = amount; }
|
||||
|
|
Loading…
Add table
Reference in a new issue