0.2.0-dev Download ZIP
142 lines ·4.0 KB Raw
| 1 | diff --git a/thirdparty/basis_universal/encoder/basisu_pvrtc1_4.h b/thirdparty/basis_universal/encoder/basisu_pvrtc1_4.h |
| 2 | index a9fe6b27aa..4b8ffb0817 100644 |
| 3 | --- a/thirdparty/basis_universal/encoder/basisu_pvrtc1_4.h |
| 4 | +++ b/thirdparty/basis_universal/encoder/basisu_pvrtc1_4.h |
| 5 | @@ -231,18 +231,7 @@ namespace basisu |
| 6 | |
| 7 | inline void set_to_black() |
| 8 | { |
| 9 | -#ifndef __EMSCRIPTEN__ |
| 10 | -#ifdef __GNUC__ |
| 11 | -#pragma GCC diagnostic push |
| 12 | -#pragma GCC diagnostic ignored "-Wclass-memaccess" |
| 13 | -#endif |
| 14 | -#endif |
| 15 | - memset(m_blocks.get_ptr(), 0, m_blocks.size_in_bytes()); |
| 16 | -#ifndef __EMSCRIPTEN__ |
| 17 | -#ifdef __GNUC__ |
| 18 | -#pragma GCC diagnostic pop |
| 19 | -#endif |
| 20 | -#endif |
| 21 | + memset((void *)m_blocks.get_ptr(), 0, m_blocks.size_in_bytes()); |
| 22 | } |
| 23 | |
| 24 | inline bool get_block_uses_transparent_modulation(uint32_t bx, uint32_t by) const |
| 25 | diff --git a/thirdparty/basis_universal/transcoder/basisu.h b/thirdparty/basis_universal/transcoder/basisu.h |
| 26 | index e1f7161141..31b20d2734 100644 |
| 27 | --- a/thirdparty/basis_universal/transcoder/basisu.h |
| 28 | +++ b/thirdparty/basis_universal/transcoder/basisu.h |
| 29 | @@ -107,21 +107,8 @@ namespace basisu |
| 30 | debug_puts(res.c_str()); |
| 31 | } |
| 32 | |
| 33 | -#ifndef __EMSCRIPTEN__ |
| 34 | -#ifdef __GNUC__ |
| 35 | -#pragma GCC diagnostic push |
| 36 | -#pragma GCC diagnostic ignored "-Wclass-memaccess" |
| 37 | -#endif |
| 38 | -#endif |
| 39 | - |
| 40 | template <typename T> inline void clear_obj(T& obj) { memset((void *)&obj, 0, sizeof(obj)); } |
| 41 | |
| 42 | -#ifndef __EMSCRIPTEN__ |
| 43 | -#ifdef __GNUC__ |
| 44 | -#pragma GCC diagnostic pop |
| 45 | -#endif |
| 46 | -#endif |
| 47 | - |
| 48 | constexpr double cPiD = 3.14159265358979323846264338327950288; |
| 49 | constexpr float REALLY_SMALL_FLOAT_VAL = .000000125f; |
| 50 | constexpr float SMALL_FLOAT_VAL = .0000125f; |
| 51 | diff --git a/thirdparty/basis_universal/transcoder/basisu_containers.h b/thirdparty/basis_universal/transcoder/basisu_containers.h |
| 52 | index 82b78cba62..9ea5917dfb 100644 |
| 53 | --- a/thirdparty/basis_universal/transcoder/basisu_containers.h |
| 54 | +++ b/thirdparty/basis_universal/transcoder/basisu_containers.h |
| 55 | @@ -1503,22 +1503,10 @@ namespace basisu |
| 56 | |
| 57 | if (BASISU_IS_BITWISE_COPYABLE(T)) |
| 58 | { |
| 59 | - |
| 60 | -#ifndef __EMSCRIPTEN__ |
| 61 | -#ifdef __GNUC__ |
| 62 | -#pragma GCC diagnostic push |
| 63 | -#pragma GCC diagnostic ignored "-Wclass-memaccess" |
| 64 | -#endif |
| 65 | -#endif |
| 66 | if ((m_p) && (other.m_p)) |
| 67 | { |
| 68 | - memcpy(m_p, other.m_p, m_size * sizeof(T)); |
| 69 | + memcpy((void *)m_p, other.m_p, m_size * sizeof(T)); |
| 70 | } |
| 71 | -#ifndef __EMSCRIPTEN__ |
| 72 | -#ifdef __GNUC__ |
| 73 | -#pragma GCC diagnostic pop |
| 74 | -#endif |
| 75 | -#endif |
| 76 | } |
| 77 | else |
| 78 | { |
| 79 | @@ -1649,19 +1637,8 @@ namespace basisu |
| 80 | |
| 81 | if (BASISU_IS_BITWISE_COPYABLE(T)) |
| 82 | { |
| 83 | -#ifndef __EMSCRIPTEN__ |
| 84 | -#ifdef __GNUC__ |
| 85 | -#pragma GCC diagnostic push |
| 86 | -#pragma GCC diagnostic ignored "-Wclass-memaccess" |
| 87 | -#endif |
| 88 | -#endif |
| 89 | if ((m_p) && (other.m_p)) |
| 90 | memcpy((void *)m_p, other.m_p, other.m_size * sizeof(T)); |
| 91 | -#ifndef __EMSCRIPTEN__ |
| 92 | -#ifdef __GNUC__ |
| 93 | -#pragma GCC diagnostic pop |
| 94 | -#endif |
| 95 | -#endif |
| 96 | } |
| 97 | else |
| 98 | { |
| 99 | @@ -2233,21 +2210,7 @@ namespace basisu |
| 100 | } |
| 101 | |
| 102 | // Copy "down" the objects to preserve, filling in the empty slots. |
| 103 | - |
| 104 | -#ifndef __EMSCRIPTEN__ |
| 105 | -#ifdef __GNUC__ |
| 106 | -#pragma GCC diagnostic push |
| 107 | -#pragma GCC diagnostic ignored "-Wclass-memaccess" |
| 108 | -#endif |
| 109 | -#endif |
| 110 | - |
| 111 | memmove((void *)pDst, pSrc, num_to_move * sizeof(T)); |
| 112 | - |
| 113 | -#ifndef __EMSCRIPTEN__ |
| 114 | -#ifdef __GNUC__ |
| 115 | -#pragma GCC diagnostic pop |
| 116 | -#endif |
| 117 | -#endif |
| 118 | } |
| 119 | else |
| 120 | { |
| 121 | @@ -2492,18 +2455,13 @@ namespace basisu |
| 122 | { |
| 123 | if ((sizeof(T) == 1) && (scalar_type<T>::cFlag)) |
| 124 | { |
| 125 | -#ifndef __EMSCRIPTEN__ |
| 126 | -#ifdef __GNUC__ |
| 127 | +#if defined(__GNUC__) && !defined(__clang__) |
| 128 | #pragma GCC diagnostic push |
| 129 | -#pragma GCC diagnostic ignored "-Wclass-memaccess" |
| 130 | -#endif |
| 131 | +#pragma GCC diagnostic ignored "-Wclass-memaccess" |
| 132 | #endif |
| 133 | memset(m_p, *reinterpret_cast<const uint8_t*>(&o), m_size); |
| 134 | - |
| 135 | -#ifndef __EMSCRIPTEN__ |
| 136 | -#ifdef __GNUC__ |
| 137 | +#if defined(__GNUC__) && !defined(__clang__) |
| 138 | #pragma GCC diagnostic pop |
| 139 | -#endif |
| 140 | #endif |
| 141 | } |
| 142 | else |