Pārlūkot izejas kodu

build: define our own std::abs() function for long long int on NaCl,

since it doesn't exist there.
legacy
Sam Hocevar sam pirms 12 gadiem
vecāks
revīzija
b5cb7601a7
1 mainītis faili ar 5 papildinājumiem un 0 dzēšanām
  1. +5
    -0
      src/lol/math/math.h

+ 5
- 0
src/lol/math/math.h Parādīt failu

@@ -111,7 +111,12 @@ static inline int16_t abs(int16_t x) { return std::abs(x); }
static inline uint16_t abs(uint16_t x) { return x; }
static inline int32_t abs(int32_t x) { return std::abs(x); }
static inline uint32_t abs(uint32_t x) { return x; }
#if defined __native_client__
/* The pepper 19 toolchain doesn't provide abs() for long long int. */
static inline int64_t abs(int64_t x) { return x > 0 ? x : -x; }
#else
static inline int64_t abs(int64_t x) { return std::abs(x); }
#endif
static inline uint64_t abs(uint64_t x) { return x; }
static inline float abs(float x) { return std::abs(x); }
static inline double abs(double x) { return std::abs(x); }


Notiek ielāde…
Atcelt
Saglabāt