reserve space for biome vectors, tiny fix to tiletype table

develop
Petr Mrázek 2009-11-25 18:19:09 +00:00
parent 5c93d339db
commit 9c54031180
2 changed files with 3 additions and 1 deletions

@ -563,6 +563,7 @@ bool API::ReadGeology( vector < vector <uint16_t> >& assign )
// make sure we don't load crap // make sure we don't load crap
assert(geolayers.getSize() > 0 && geolayers.getSize() <= 16); assert(geolayers.getSize() > 0 && geolayers.getSize() <= 16);
d->v_geology[i].reserve(geolayers.getSize());
// finally, read the layer matgloss // finally, read the layer matgloss
for(uint32_t j = 0;j< geolayers.getSize();j++) for(uint32_t j = 0;j< geolayers.getSize();j++)
{ {
@ -573,6 +574,7 @@ bool API::ReadGeology( vector < vector <uint16_t> >& assign )
} }
} }
assign.clear(); assign.clear();
assign.reserve(eBiomeCount);
// TODO: clean this up // TODO: clean this up
for(int i = 0; i< eBiomeCount;i++) for(int i = 0; i< eBiomeCount;i++)
{ {

@ -712,7 +712,7 @@ namespace DFHack
{"constructed stair up/down",STAIR_UPDOWN,CONSTRUCTED, VAR_1}, {"constructed stair up/down",STAIR_UPDOWN,CONSTRUCTED, VAR_1},
{"constructed stair down",STAIR_DOWN,CONSTRUCTED, VAR_1}, {"constructed stair down",STAIR_DOWN,CONSTRUCTED, VAR_1},
{"constructed stair up",STAIR_UP,CONSTRUCTED, VAR_1}, {"constructed stair up",STAIR_UP,CONSTRUCTED, VAR_1},
{"constructed ramp",STAIR_UPDOWN,CONSTRUCTED, VAR_1}, {"constructed ramp",RAMP,CONSTRUCTED, VAR_1},
{0 ,EMPTY, AIR, VAR_1} // end {0 ,EMPTY, AIR, VAR_1} // end
}; };