Changed: #1219 Bad color when rgba.cpp is compiled with GCC 4.2.4

This commit is contained in:
kervala 2010-12-22 14:14:30 +01:00
parent d6f29299a1
commit e53a439e7f

View file

@ -646,6 +646,11 @@ bool CRGBA::convertToHLS(float &h, float &l, float &s) const
{
h = 4.f + (r - g) / diff;
}
else
{
// this case is to fix a compiler bug
h = (g - b) / diff;
}
h *= 60.f; // scale to [0..360]