Fix signed conversion warnings.

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

No files matched your search

+4 -2
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);
}
};