the result of the parameter str_to_terrain was unused so removed it
part 1 of the terrain.id removal
This commit is contained in:
parent
a5041e75ce
commit
0bf6de05b1
4 changed files with 4 additions and 11 deletions
|
@ -261,8 +261,8 @@ gamemap::location::DIRECTION gamemap::location::get_opposite_dir(gamemap::locati
|
|||
gamemap::gamemap(const config& cfg, const std::string& data) : tiles_(1)
|
||||
{
|
||||
LOG_G << "loading map: '" << data << "'\n";
|
||||
const config::child_list& terrains = cfg.get_children("terrain");
|
||||
create_terrain_maps(terrains,terrainList_,letterToTerrain_,terrain_);
|
||||
const config::child_list& terrains = cfg.get_children("terrain");
|
||||
create_terrain_maps(terrains,terrainList_,letterToTerrain_);
|
||||
|
||||
read(data);
|
||||
}
|
||||
|
|
|
@ -211,8 +211,6 @@ private:
|
|||
|
||||
t_translation::t_list terrainList_;
|
||||
std::map<t_translation::t_letter, terrain_type> letterToTerrain_;
|
||||
std::map<std::string,terrain_type> terrain_;
|
||||
|
||||
std::vector<location> villages_;
|
||||
|
||||
mutable std::map<location, t_translation::t_letter> borderCache_;
|
||||
|
|
|
@ -208,8 +208,7 @@ bool terrain_type::is_keep() const
|
|||
|
||||
void create_terrain_maps(const std::vector<config*>& cfgs,
|
||||
t_translation::t_list& terrain_list,
|
||||
std::map<t_translation::t_letter, terrain_type>& letter_to_terrain,
|
||||
std::map<std::string, terrain_type>& str_to_terrain)
|
||||
std::map<t_translation::t_letter, terrain_type>& letter_to_terrain)
|
||||
{
|
||||
for(std::vector<config*>::const_iterator i = cfgs.begin();
|
||||
i != cfgs.end(); ++i) {
|
||||
|
@ -217,8 +216,5 @@ void create_terrain_maps(const std::vector<config*>& cfgs,
|
|||
terrain_list.push_back(terrain.number());
|
||||
letter_to_terrain.insert(std::pair<t_translation::t_letter, terrain_type>(
|
||||
terrain.number(),terrain));
|
||||
|
||||
str_to_terrain.insert(std::pair<std::string,terrain_type>(
|
||||
terrain.id(),terrain));
|
||||
}
|
||||
}
|
||||
|
|
|
@ -88,6 +88,5 @@ private:
|
|||
|
||||
void create_terrain_maps(const std::vector<config*>& cfgs,
|
||||
t_translation::t_list& terrain_list,
|
||||
std::map<t_translation::t_letter, terrain_type>& letter_to_terrain,
|
||||
std::map<std::string, terrain_type>& str_to_terrain);
|
||||
std::map<t_translation::t_letter, terrain_type>& letter_to_terrain);
|
||||
#endif
|
||||
|
|
Loading…
Add table
Reference in a new issue