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:
parent
b8b1df01e7
commit
e7bebaa79c
@ -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++;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user