0.2.0-dev Download ZIP
43 lines ·1.3 KB Raw
| 1 | diff --git a/thirdparty/misc/FastNoiseLite.h b/thirdparty/misc/FastNoiseLite.h |
| 2 | index ed97b0fcac..fb6dbcb92a 100644 |
| 3 | --- a/thirdparty/misc/FastNoiseLite.h |
| 4 | +++ b/thirdparty/misc/FastNoiseLite.h |
| 5 | @@ -52,6 +52,8 @@ |
| 6 | |
| 7 | #include <cmath> |
| 8 | |
| 9 | +namespace fastnoiselite { |
| 10 | + |
| 11 | class FastNoiseLite |
| 12 | { |
| 13 | public: |
| 14 | @@ -1609,6 +1611,12 @@ private: |
| 15 | } |
| 16 | } |
| 17 | |
| 18 | +// GCC raises warnings when integer overflows occur, which are needed for hashing here. |
| 19 | +#if defined(__GNUC__) && !defined(__clang__) |
| 20 | +#pragma GCC diagnostic push |
| 21 | +#pragma GCC diagnostic ignored "-Waggressive-loop-optimizations" |
| 22 | +#endif |
| 23 | + |
| 24 | template <typename FNfloat> |
| 25 | float SingleCellular(int seed, FNfloat x, FNfloat y, FNfloat z) const |
| 26 | { |
| 27 | @@ -1763,6 +1771,9 @@ private: |
| 28 | } |
| 29 | } |
| 30 | |
| 31 | +#if defined(__GNUC__) && !defined(__clang__) |
| 32 | +#pragma GCC diagnostic pop |
| 33 | +#endif |
| 34 | |
| 35 | // Perlin Noise |
| 36 | |
| 37 | @@ -2583,4 +2594,6 @@ const T FastNoiseLite::Lookup<T>::RandVecs3D[] = |
| 38 | -0.7870349638f, 0.03447489231f, 0.6159443543f, 0, -0.2015596421f, 0.6859872284f, 0.6991389226f, 0, -0.08581082512f, -0.10920836f, -0.9903080513f, 0, 0.5532693395f, 0.7325250401f, -0.396610771f, 0, -0.1842489331f, -0.9777375055f, -0.1004076743f, 0, 0.0775473789f, -0.9111505856f, 0.4047110257f, 0, 0.1399838409f, 0.7601631212f, -0.6344734459f, 0, 0.4484419361f, -0.845289248f, 0.2904925424f, 0 |
| 39 | }; |
| 40 | |
| 41 | +} // namespace fastnoiselite |
| 42 | + |
| 43 | #endif |