1
0
mirror of https://github.com/zenorogue/hyperrogue.git synced 2024-11-23 21:07:17 +00:00

rogueviz::sag:: conserve memory for sagdist

This commit is contained in:
Zeno Rogue 2022-10-23 15:45:04 +02:00
parent b8b1df01e7
commit e7bebaa79c

View File

@ -44,7 +44,7 @@ namespace sag {
vector<cell*> sagcells; vector<cell*> sagcells;
/** table of distances between SAG cells */ /** table of distances between SAG cells */
vector<vector<int>> sagdist; vector<vector<unsigned short>> sagdist;
/** what node is on sagcells[i] */ /** what node is on sagcells[i] */
vector<int> sagnode; vector<int> sagnode;
@ -141,7 +141,7 @@ namespace sag {
} }
max_sag_dist = 0; max_sag_dist = 0;
for(auto& d: sagdist) for(auto& x: d) max_sag_dist = max(max_sag_dist, x); for(auto& d: sagdist) for(auto& x: d) max_sag_dist = max<int>(max_sag_dist, x);
max_sag_dist++; max_sag_dist++;
} }