Fix signed conversion warnings.

This commit is contained in:
Daniel James
2016-10-05 09:45:53 +01:00
parent a0dc86ecbc
commit 71d19820ac
15 changed files with 61 additions and 40 deletions

View File

@@ -25,9 +25,11 @@ namespace equality_tests
return x % 1000 == y % 1000;
}
int operator()(int x) const
std::size_t operator()(int x) const
{
return alt_hash_ ? x % 250 : (x + 5) % 250;
return alt_hash_ ?
static_cast<std::size_t>(x % 250) :
static_cast<std::size_t>((x + 5) % 250);
}
};