removing 2 dead stores to speed up survey::survey_mid_level_tile

- survey.cpp: removing layer_bottom and layer_top, which are never read, but slow down survey_mid_level_tile significantly because entries are added quite often into the tree map structure
- survey.h: removing now obsolete include for map
develop
bseiller 2021-01-18 19:38:57 +01:00
parent e7b770b65a
commit c300cae2f9
2 changed files with 0 additions and 4 deletions

@ -996,7 +996,6 @@ void embark_assist::survey::survey_mid_level_tile(embark_assist::defs::geo_data
base_z = elevation - 1; base_z = elevation - 1;
features = details->features[i][k]; features = details->features[i][k];
std::map<int, int> layer_bottom, layer_top;
mlt->at(i).at(k).adamantine_level = -1; mlt->at(i).at(k).adamantine_level = -1;
mlt->at(i).at(k).magma_level = -1; mlt->at(i).at(k).magma_level = -1;
@ -1027,8 +1026,6 @@ void embark_assist::survey::survey_mid_level_tile(embark_assist::defs::geo_data
feature->min_z != -30000) { feature->min_z != -30000) {
auto layer = world_data->underground_regions[feature->layer]; auto layer = world_data->underground_regions[feature->layer];
layer_bottom[layer->layer_depth] = feature->min_z;
layer_top[layer->layer_depth] = feature->max_z;
base_z = std::min((int)base_z, (int)feature->min_z); base_z = std::min((int)base_z, (int)feature->min_z);
if (layer->type == df::world_underground_region::MagmaSea) { if (layer->type == df::world_underground_region::MagmaSea) {

@ -1,5 +1,4 @@
#pragma once #pragma once
#include <map>
#include "DataDefs.h" #include "DataDefs.h"
#include "df/coord2d.h" #include "df/coord2d.h"