Fix compiler warning

This commit is contained in:
Benau
2018-08-03 20:26:16 +08:00
parent 4d2e79da4c
commit ce58014cab
2 changed files with 2 additions and 2 deletions

View File

@@ -394,7 +394,7 @@ int PowerupManager::WeightsData::getRandomItem(int rank, unsigned int random_num
if(rank>(int)m_summed_weights_for_rank.size())
rank = m_summed_weights_for_rank.size()-1;
else if (rank<0) rank = 0; // E.g. battle mode, which has rank -1
const std::vector<int> &summed_weights = m_summed_weights_for_rank[rank];
const std::vector<unsigned> &summed_weights = m_summed_weights_for_rank[rank];
// The last entry is the sum of all previous entries, i.e. the maximum
// value
#undef ITEM_DISTRIBUTION_DEBUG

View File

@@ -94,7 +94,7 @@ private:
/** This field is only populated for the WeightData class that
* is used during a race. It contains for each rank the summed
* weights for easy lookup during a race. */
std::vector < std::vector<int> > m_summed_weights_for_rank;
std::vector < std::vector<unsigned> > m_summed_weights_for_rank;
public:
// The friend declaration gives the PowerupManager access to the