Browse Source

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
reviewable/pr6031/r2
Anthony Bilinski 5 years ago
parent
commit
715794f664
No known key found for this signature in database
GPG Key ID: 2AA8E0DA1B31FB3C
  1. 2
      src/widget/tool/identicon.cpp

2
src/widget/tool/identicon.cpp

@ -109,7 +109,7 @@ float Identicon::bytesToColor(QByteArray bytes) @@ -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));
}
/**

Loading…
Cancel
Save