08-28-2014, 08:20 PM
(08-28-2014, 06:07 PM)LO1ZB Wrote: It is supposed, that params at places like this:
are only checked for validity in debug mode?Code:inline static void SetBiome(BiomeMap & a_BiomeMap, int a_X, int a_Z, EMCSBiome a_Biome)
{
ASSERT((a_X >= 0) && (a_X <= Width));
ASSERT((a_Z >= 0) && (a_Z <= Width));
a_BiomeMap[a_X + Width * a_Z] = a_Biome;
}
I'm asking, because MSVS is giving me that warning after I run code analysis tool.
http://msdn.microsoft.com/en-us/library/ww5t02fa.aspx
Yes, the ASSERT macro is emptied in Release builds.
That's a good point though, what if something tries to write to a_BiomeMap[16 + Width * 16] (a_BiomeMap[272])?