Skip to content

Commit

Permalink
Patch FastNoiseLite due to new aggressive warnings
Browse files Browse the repository at this point in the history
  • Loading branch information
Zylann committed Nov 3, 2023
1 parent 208695b commit 70fdf82
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions thirdparty/fast_noise/FastNoiseLite.h
Original file line number Diff line number Diff line change
Expand Up @@ -1484,6 +1484,12 @@ class FastNoiseLite
return value * 9.046026385208288f;
}

// <Zylann> GCC raises warnings when integer overflows occur, which are needed for hashing here.
// Same fix as in Godot e41e2a110373a251cd0664f077ada6f344e5c8fd
#if defined(__GNUC__) && !defined(__clang__)
#pragma GCC diagnostic push
#pragma GCC diagnostic ignored "-Waggressive-loop-optimizations"
#endif

// Cellular Noise

Expand Down Expand Up @@ -1771,6 +1777,10 @@ class FastNoiseLite
}
}

// <Zylann>
#if defined(__GNUC__) && !defined(__clang__)
#pragma GCC diagnostic pop
#endif

// Perlin Noise

Expand Down

0 comments on commit 70fdf82

Please sign in to comment.