1
0
mirror of https://github.com/qTox/qTox.git synced 2024-03-22 14:00:36 +08:00

chore(build): fix implicit narrowing warning by making it explicit

Exact accuracy isn't needed for the normalized value, being off by one part per
quadrillion is ok.

Fix #6000
This commit is contained in:
Anthony Bilinski 2020-03-22 02:05:19 -07:00
parent 2b981d88a2
commit 715794f664
No known key found for this signature in database
GPG Key ID: 2AA8E0DA1B31FB3C

View File

@ -109,7 +109,7 @@ float Identicon::bytesToColor(QByteArray bytes)
// normalize to 0.0 ... 1.0
return (static_cast<float>(hue))
/ (((static_cast<uint64_t>(1)) << (8 * IDENTICON_COLOR_BYTES)) - 1);
/ (static_cast<float>(((static_cast<uint64_t>(1)) << (8 * IDENTICON_COLOR_BYTES)) - 1));
}
/**