mirror of
https://port.numenaute.org/aleajactaest/khanat-opennel-code.git
synced 2024-11-05 23:09:04 +00:00
Fixed: #1219 Bad color when rgba.cpp is compiled with GCC 4.2.4
This commit is contained in:
parent
546749fedf
commit
5a3cab6f3d
2 changed files with 1 additions and 11 deletions
|
@ -48,17 +48,7 @@ NL_ADD_LIB_SUFFIX(nelmisc)
|
|||
|
||||
ADD_DEFINITIONS(${LIBXML2_DEFINITIONS})
|
||||
|
||||
IF(WITH_STATIC)
|
||||
# acemtp: it's because my gcc is too old and cannot optimize this file
|
||||
# on old gcc used to compile static ryzom, if you compile rgba with full optim, there's a visual bug (blue people)
|
||||
SET_SOURCE_FILES_PROPERTIES(rgba.cpp PROPERTIES COMPILE_FLAGS "-O0")
|
||||
ENDIF(WITH_STATIC)
|
||||
|
||||
IF(WITH_PCH AND NOT WITH_STATIC)
|
||||
# acemtp: it's because my gcc is too old and cannot optimize this file
|
||||
# removed the pch or we cannot define -O0 for the rgba specificaly
|
||||
ADD_NATIVE_PRECOMPILED_HEADER(nelmisc ${CMAKE_CURRENT_SOURCE_DIR}/stdmisc.h ${CMAKE_CURRENT_SOURCE_DIR}/stdmisc.cpp)
|
||||
ENDIF(WITH_PCH AND NOT WITH_STATIC)
|
||||
|
||||
NL_GEN_PC(nel-misc.pc)
|
||||
INSTALL(TARGETS nelmisc LIBRARY DESTINATION lib ARCHIVE DESTINATION lib COMPONENT libraries)
|
||||
|
|
|
@ -639,7 +639,7 @@ bool CRGBA::convertToHLS(float &h, float &l, float &s) const
|
|||
{
|
||||
h = 2.f + (b - r) / diff;
|
||||
}
|
||||
else
|
||||
else if (maxV == b)
|
||||
{
|
||||
h = 4.f + (r - g) / diff;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue