1
0
Fork 0
mirror of https://github.com/juce-framework/JUCE.git synced 2026-01-10 23:44:24 +00:00

Clang: Fix warnings when building with clang 10

This commit is contained in:
reuk 2020-06-29 19:59:58 +01:00
parent 286bb40a9e
commit 394c4fd475
144 changed files with 896 additions and 839 deletions

View file

@ -46,11 +46,11 @@ namespace ColourHelpers
if (hi > 0)
{
auto invDiff = 1.0f / (hi - lo);
auto invDiff = 1.0f / (float) (hi - lo);
auto red = (hi - r) * invDiff;
auto green = (hi - g) * invDiff;
auto blue = (hi - b) * invDiff;
auto red = (float) (hi - r) * invDiff;
auto green = (float) (hi - g) * invDiff;
auto blue = (float) (hi - b) * invDiff;
if (r == hi) hue = blue - green;
else if (g == hi) hue = 2.0f + red - blue;
@ -79,12 +79,12 @@ namespace ColourHelpers
if (hi > 0)
{
lightness = ((hi + lo) / 2.0f) / 255.0f;
lightness = ((float) (hi + lo) / 2.0f) / 255.0f;
if (lightness > 0.0f)
hue = getHue (col);
saturation = (hi - lo) / (1.0f - std::abs ((2.0f * lightness) - 1.0f));
saturation = (float) (hi - lo) / (1.0f - std::abs ((2.0f * lightness) - 1.0f));
}
}
@ -136,12 +136,12 @@ namespace ColourHelpers
if (hi > 0)
{
saturation = (hi - lo) / (float) hi;
saturation = (float) (hi - lo) / (float) hi;
if (saturation > 0.0f)
hue = getHue (col);
brightness = hi / 255.0f;
brightness = (float) hi / 255.0f;
}
}