https://gcc.gnu.org/bugzilla/show_bug.cgi?id=82302
--- Comment #14 from Martin Liška <marxin at gcc dot gnu.org> ---
(In reply to krzysio.kurek from comment #12)
> UBSAN errors regarding integer overflow is by design, and is a part of
> libnoise.
> I can't find any documentation or help on what invalid vptr errors are
> though.
So it's quite clear what's happening. You can't call member functions before an
object is constructed:
TemperateForestBiome::TemperateForestBiome(int seed)
: Biome (getNoiseParameters(), 55, 75, seed)
{
}
...
NoiseParameters TemperateForestBiome::getNoiseParameters()
{
NoiseParameters heightParams;
heightParams.octaves = 5;
heightParams.amplitude = 100;
heightParams.smoothness = 195;
heightParams.heightOffset = -30;
heightParams.roughness = 0.52;
return heightParams;
}
Please take a look here:
https://stackoverflow.com/questions/3899555/is-there-any-problem-of-calling-functions-in-the-initialization-list