fix sign-compare warning

This commit is contained in:
Allen Guan
2021-10-30 18:38:40 +08:00
parent b8f69a6dd4
commit 6ddff0f72c

View File

@@ -9,7 +9,7 @@
/** Generate an increasingly large number of primes
* and store in a list
*/
std::vector<int> primes(int max) {
std::vector<int> primes(size_t max) {
std::vector<int> res;
std::vector<bool> is_not_prime(max + 1, false);
for (size_t i = 2; i <= max; i++) {