move unchanging var out of loop

develop
Myk Taylor 2023-06-17 05:41:11 -07:00
parent 1390fd2e3e
commit 9562897258
No known key found for this signature in database
GPG Key ID: 8A39CA0FA0C16E78
1 changed files with 3 additions and 3 deletions

@ -662,6 +662,9 @@ static command_result map_prospector(color_ostream &con,
for(uint32_t z = 0; z < z_max; z++)
{
// the '- 100' is because DF v50 and later have a 100 offset in reported elevation
int global_z = world->map.region_z + z - 100;
for(uint32_t b_y = 0; b_y < y_max; b_y++)
{
for(uint32_t b_x = 0; b_x < x_max; b_x++)
@ -678,9 +681,6 @@ static command_result map_prospector(color_ostream &con,
b->GetGlobalFeature(&blockFeatureGlobal);
b->GetLocalFeature(&blockFeatureLocal);
// the '- 100' is because DF v50 and later have a 100 offset in reported elevation
int global_z = world->map.region_z + z - 100;
// Iterate over all the tiles in the block
for(uint32_t y = 0; y < 16; y++)
{