Cleanup: use override specifier everywhere, and enable gcc warning to check for it.

This commit is contained in:
Twan van Laarhoven
2020-05-16 00:23:18 +02:00
parent a7c47729c1
commit 5deaeeeb3e
113 changed files with 710 additions and 714 deletions
+2 -2
View File
@@ -256,7 +256,7 @@ void PackInstance::generate(vector<CardP>* out) {
// 1. the weights of each item, and of the cards
vector<WeightedItem> weighted_items;
FOR_EACH_CONST(item, pack_type.items) {
WeightedItem wi = {0,0,parent.gen()};
WeightedItem wi = {0,0,(int)parent.gen()};
if (pack_type.select == SELECT_EQUAL_PROPORTIONAL) {
wi.weight = item->weight * parent.get(item->name).total_weight;
} else if (pack_type.select == SELECT_EQUAL_NONEMPTY) {
@@ -266,7 +266,7 @@ void PackInstance::generate(vector<CardP>* out) {
}
weighted_items.push_back(wi);
}
WeightedItem wi = {cards.size(),0,parent.gen()};
WeightedItem wi = {(double)cards.size(),0,(int)parent.gen()};
weighted_items.push_back(wi);
// 2. divide the requested_copies among the cards and the items, taking the weights into account
weighted_equal_divide(weighted_items, (int)requested_copies);