1
0
mirror of https://github.com/zenorogue/hyperrogue.git synced 2025-12-20 12:58:06 +00:00

Eliminate VLAs for the benefit of MSVC.

This commit is contained in:
Arthur O'Dwyer
2018-06-27 15:35:45 -07:00
parent 6753cc2e39
commit 62db7ee250
7 changed files with 21 additions and 22 deletions

View File

@@ -2046,7 +2046,7 @@ void livecaves() {
vector<cell*> bringlife;
int gr = gamerange();
int heatvals[dcs];
std::vector<int> heatvals(dcs);
for(int i=0; i<dcs; i++) {
cell *c = allcells[i];
@@ -2991,7 +2991,7 @@ namespace ca {
if(cwt.c->land != laCA) return;
vector<cell*>& allcells = currentmap->allcells();
int dcs = isize(allcells);
bool willlive[dcs];
std::vector<bool> willlive(dcs);
for(int i=0; i<dcs; i++) {
cell *c = allcells[i];
if(c->land != laCA) return;
@@ -3126,9 +3126,9 @@ namespace windmap {
for(int i=0; i<N; i++) windcodes[i] = hrand(256);
bool inqueue[N];
vector<bool> inqueue(N, true);
vector<int> tocheck;
for(int i=0; i<N; i++) tocheck.push_back(i), inqueue[i] = true;
for(int i=0; i<N; i++) tocheck.push_back(i);
hrandom_shuffle(&tocheck[0], isize(tocheck));
for(int a=0; a<isize(tocheck); a++) {