mirror of
https://github.com/Relintai/godot_fastnoise.git
synced 2025-03-12 18:38:59 +01:00
Fix compile for 4.0. (At least for g++, will probably not work on other compilers for now)
This commit is contained in:
parent
ea3b34d972
commit
f7aed39c06
@ -1,5 +1,11 @@
|
||||
#include "fastnoise_noise_params.h"
|
||||
|
||||
#include "core/version.h"
|
||||
|
||||
#if VERSION_MAJOR >= 4
|
||||
#define REAL FLOAT
|
||||
#endif
|
||||
|
||||
void FastnoiseNoiseParams::setup_noise(Ref<FastNoise> noise) {
|
||||
noise->set_seed(_seed);
|
||||
noise->set_noise_type(_noise_type);
|
||||
|
@ -34,6 +34,16 @@
|
||||
#include <algorithm>
|
||||
#include <random>
|
||||
|
||||
#include "core/version.h"
|
||||
|
||||
#if VERSION_MAJOR >= 4
|
||||
|
||||
#pragma GCC diagnostic push
|
||||
#pragma GCC diagnostic ignored "-Wstrict-aliasing"
|
||||
#pragma GCC diagnostic ignored "-Wunused-function"
|
||||
#pragma GCC diagnostic ignored "-Wmaybe-uninitialized"
|
||||
#endif
|
||||
|
||||
namespace fastnoise {
|
||||
|
||||
const FN_DECIMAL GRAD_X[] =
|
||||
@ -2258,3 +2268,10 @@ void FastNoise::SingleGradientPerturb(unsigned char offset, FN_DECIMAL warpAmp,
|
||||
}
|
||||
|
||||
} // namespace fastnoise
|
||||
|
||||
|
||||
|
||||
#if VERSION_MAJOR >= 4
|
||||
|
||||
#pragma GCC diagnostic pop
|
||||
#endif
|
Loading…
Reference in New Issue
Block a user