Work around gcc compiler shortcoming

This commit is contained in:
rdb 2015-04-14 15:46:52 +02:00
parent 500da29013
commit 8360ad442a
2 changed files with 6 additions and 6 deletions

View File

@ -18,7 +18,7 @@
// Description: Decodes the sRGB-encoded unsigned char value to
// a linearized float in the range 0-1.
////////////////////////////////////////////////////////////////////
CONSTEXPR float decode_sRGB_float(unsigned char val) {
INLINE float decode_sRGB_float(unsigned char val) {
return to_linear_float_table[val];
}
@ -40,7 +40,7 @@ INLINE float decode_sRGB_float(float val) {
// Description: Decodes the sRGB-encoded unsigned char value to
// a linearized unsigned char value.
////////////////////////////////////////////////////////////////////
CONSTEXPR unsigned char decode_sRGB_uchar(unsigned char val) {
INLINE unsigned char decode_sRGB_uchar(unsigned char val) {
return to_linear_uchar_table[val];
}
@ -88,7 +88,7 @@ encode_sRGB_float(float val) {
// Description: Encodes the linearized unsigned char value to an
// sRGB-encoded unsigned char value.
////////////////////////////////////////////////////////////////////
CONSTEXPR unsigned char
INLINE unsigned char
encode_sRGB_uchar(unsigned char val) {
return to_srgb8_table[val];
}

View File

@ -26,14 +26,14 @@ extern EXPCL_PANDA_PNMIMAGE ALIGN_64BYTE const unsigned char to_srgb8_table[256]
extern EXPCL_PANDA_PNMIMAGE ALIGN_64BYTE const unsigned char to_linear_uchar_table[256];
extern EXPCL_PANDA_PNMIMAGE ALIGN_64BYTE const float to_linear_float_table[256];
EXPCL_PANDA_PNMIMAGE CONSTEXPR float decode_sRGB_float(unsigned char val);
EXPCL_PANDA_PNMIMAGE INLINE float decode_sRGB_float(unsigned char val);
EXPCL_PANDA_PNMIMAGE INLINE float decode_sRGB_float(float val);
EXPCL_PANDA_PNMIMAGE CONSTEXPR unsigned char decode_sRGB_uchar(unsigned char val);
EXPCL_PANDA_PNMIMAGE INLINE unsigned char decode_sRGB_uchar(unsigned char val);
EXPCL_PANDA_PNMIMAGE INLINE unsigned char decode_sRGB_uchar(float val);
EXPCL_PANDA_PNMIMAGE INLINE float encode_sRGB_float(unsigned char val);
EXPCL_PANDA_PNMIMAGE INLINE float encode_sRGB_float(float val);
EXPCL_PANDA_PNMIMAGE CONSTEXPR unsigned char encode_sRGB_uchar(unsigned char val);
EXPCL_PANDA_PNMIMAGE INLINE unsigned char encode_sRGB_uchar(unsigned char val);
EXPCL_PANDA_PNMIMAGE INLINE unsigned char encode_sRGB_uchar(float val);
// These functions convert more than one component in one go,