44 lines
1.3 KiB
Diff
44 lines
1.3 KiB
Diff
|
diff --git a/thirdparty/noise/FastNoiseLite.h b/thirdparty/noise/FastNoiseLite.h
|
||
|
index ed97b0fcac..fb6dbcb92a 100644
|
||
|
--- a/thirdparty/noise/FastNoiseLite.h
|
||
|
+++ b/thirdparty/noise/FastNoiseLite.h
|
||
|
@@ -52,6 +52,8 @@
|
||
|
|
||
|
#include <cmath>
|
||
|
|
||
|
+namespace fastnoiselite {
|
||
|
+
|
||
|
class FastNoiseLite
|
||
|
{
|
||
|
public:
|
||
|
@@ -1609,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 <typename FNfloat>
|
||
|
float SingleCellular(int seed, FNfloat x, FNfloat y, FNfloat z) const
|
||
|
{
|
||
|
@@ -1763,6 +1771,9 @@ private:
|
||
|
}
|
||
|
}
|
||
|
|
||
|
+#if defined(__GNUC__) && !defined(__clang__)
|
||
|
+#pragma GCC diagnostic pop
|
||
|
+#endif
|
||
|
|
||
|
// Perlin Noise
|
||
|
|
||
|
@@ -2583,4 +2594,6 @@ const T FastNoiseLite::Lookup<T>::RandVecs3D[] =
|
||
|
-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
|
||
|
};
|
||
|
|
||
|
+} // namespace fastnoiselite
|
||
|
+
|
||
|
#endif
|