Browse Source

core: fix compilation warnings in one of the float-to-half LUTs.

legacy
Sam Hocevar sam 13 years ago
parent
commit
5d01ca923a
1 changed files with 2 additions and 4 deletions
  1. +2
    -4
      src/half.cpp

+ 2
- 4
src/half.cpp View File

@@ -46,13 +46,11 @@ static inline uint16_t float_to_half_nobranch(uint32_t x)
static uint16_t const basetable[512] = static uint16_t const basetable[512] =
{ {
#define S1(i) (((i) < 103) ? 0x0000 : \ #define S1(i) (((i) < 103) ? 0x0000 : \
((i) < 113) ? 0x0400 >> (113 - (i)) : \
((i) < 113) ? 0x0400 >> (0x1f & (113 - (i))) : \
((i) < 143) ? ((i) - 112) << 10 : 0x7c00) ((i) < 143) ? ((i) - 112) << 10 : 0x7c00)
S256(0), S256(0),
#undef S1 #undef S1
#define S1(i) (0x8000 | (((i) < 103) ? 0x0000 : \
((i) < 113) ? 0x0400 >> (113 - (i)) : \
((i) < 143) ? ((i) - 112) << 10 : 0x7c00))
#define S1(i) (0x8000 | basetable[i])
S256(0), S256(0),
#undef S1 #undef S1
}; };


Loading…
Cancel
Save