diff --git a/thirdparty/noise/FastNoiseLite.h b/thirdparty/noise/FastNoiseLite.h index 8015bf636a4..a213f0888e3 100644 --- a/thirdparty/noise/FastNoiseLite.h +++ b/thirdparty/noise/FastNoiseLite.h @@ -1611,6 +1611,12 @@ private: } } +// GCC raises warnings when integer overflows occur, which are needed for hashing here. +#if defined(__GNUC__) && !defined(__clang__) +#pragma GCC diagnostic push +#pragma GCC diagnostic ignored "-Waggressive-loop-optimizations" +#endif + template float SingleCellular(int seed, FNfloat x, FNfloat y, FNfloat z) const { @@ -1765,6 +1771,9 @@ private: } } +#if defined(__GNUC__) && !defined(__clang__) +#pragma GCC diagnostic pop +#endif // Perlin Noise diff --git a/thirdparty/noise/patches/FastNoiseLite.patch b/thirdparty/noise/patches/FastNoiseLite.patch index 41ec943077b..3c835c7b062 100644 --- a/thirdparty/noise/patches/FastNoiseLite.patch +++ b/thirdparty/noise/patches/FastNoiseLite.patch @@ -430,3 +430,26 @@ { x *= frequency; y *= frequency; +@@ -1611,6 +1611,12 @@ private: + } + } + ++// GCC raises warnings when integer overflows occur, which are needed for hashing here. ++#if defined(__GNUC__) && !defined(__clang__) ++#pragma GCC diagnostic push ++#pragma GCC diagnostic ignored "-Waggressive-loop-optimizations" ++#endif ++ + template + float SingleCellular(int seed, FNfloat x, FNfloat y, FNfloat z) const + { +@@ -1765,6 +1771,9 @@ private: + } + } + ++#if defined(__GNUC__) && !defined(__clang__) ++#pragma GCC diagnostic pop ++#endif + + // Perlin Noise + \ No newline at end of file