You've already forked godot
mirror of
https://github.com/godotengine/godot.git
synced 2025-11-04 12:00:25 +00:00
Fix GCC warning with -Waggressive-loop-optimizations due to overflow
This commit is contained in:
9
thirdparty/noise/FastNoiseLite.h
vendored
9
thirdparty/noise/FastNoiseLite.h
vendored
@@ -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 <typename FNfloat>
|
template <typename FNfloat>
|
||||||
float SingleCellular(int seed, FNfloat x, FNfloat y, FNfloat z) const
|
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
|
// Perlin Noise
|
||||||
|
|
||||||
|
|||||||
23
thirdparty/noise/patches/FastNoiseLite.patch
vendored
23
thirdparty/noise/patches/FastNoiseLite.patch
vendored
@@ -430,3 +430,26 @@
|
|||||||
{
|
{
|
||||||
x *= frequency;
|
x *= frequency;
|
||||||
y *= 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 <typename FNfloat>
|
||||||
|
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
|
||||||
|
|
||||||
Reference in New Issue
Block a user