Fixing the MSVC compiler warning a different way; removed use of static_cast and instead used a signed integer parameter.