Fix minor potential narrowing bug

dev
Nick Terrell 2016-09-06 20:27:11 -07:00
parent 823bf3d08d
commit 4d4d1ad3b3
1 changed files with 1 additions and 1 deletions

View File

@ -221,7 +221,7 @@ static size_t calculateStep(
std::uintmax_t size,
size_t numThreads,
const ZSTD_parameters &params) {
size_t step = 1ul << (params.cParams.windowLog + 2);
size_t step = size_t{1} << (params.cParams.windowLog + 2);
// If file size is known, see if a smaller step will spread work more evenly
if (size != 0) {
const std::uintmax_t newStep = size / std::uintmax_t{numThreads};