Fix windows warning on type conversion (#1121)

This commit is contained in:
Dominic Hamon 2021-04-27 08:24:27 +01:00 committed by GitHub
parent 86da5ec294
commit 264976def3
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -23,7 +23,7 @@ AddPowers(std::vector<T>* dst, T lo, T hi, int mult) {
static const T kmax = std::numeric_limits<T>::max(); static const T kmax = std::numeric_limits<T>::max();
// Space out the values in multiples of "mult" // Space out the values in multiples of "mult"
for (T i = 1; i <= hi; i *= mult) { for (T i = static_cast<T>(1); i <= hi; i *= mult) {
if (i >= lo) { if (i >= lo) {
dst->push_back(i); dst->push_back(i);
} }