Codechange: Replace all usages of alloca/AllocaM with more modern/less discouraged alternatives
This commit is contained in:
@@ -580,7 +580,7 @@ static void HeightMapCurves(uint level)
|
||||
float factor = sqrt((float)_height_map.size_x / (float)_height_map.size_y);
|
||||
uint sx = Clamp((int)(((1 << level) * factor) + 0.5), 1, 128);
|
||||
uint sy = Clamp((int)(((1 << level) / factor) + 0.5), 1, 128);
|
||||
byte *c = AllocaM(byte, static_cast<size_t>(sx) * sy);
|
||||
std::vector<byte> c(static_cast<size_t>(sx) * sy);
|
||||
|
||||
for (uint i = 0; i < sx * sy; i++) {
|
||||
c[i] = Random() % lengthof(curve_maps);
|
||||
|
Reference in New Issue
Block a user