[FancyZones] Fixed type cast warning (#6311)

This commit is contained in:
Seraphima Zykova 2020-09-03 17:50:49 +03:00 committed by GitHub
parent c887f0ce5b
commit c9855a2671
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -104,9 +104,9 @@ namespace FancyZonesUtils
try
{
const long long tmp = std::stoll(hex.data(), nullptr, 16);
const BYTE nR = (tmp & 0xFF0000) >> 16;
const BYTE nG = (tmp & 0xFF00) >> 8;
const BYTE nB = (tmp & 0xFF);
const BYTE nR = static_cast<BYTE>((tmp & 0xFF0000) >> 16);
const BYTE nG = static_cast<BYTE>((tmp & 0xFF00) >> 8);
const BYTE nB = static_cast<BYTE>((tmp & 0xFF));
return RGB(nR, nG, nB);
}
catch (const std::exception&)