Skip to content

Commit

Permalink
Update type_data.hpp
Browse files Browse the repository at this point in the history
[ci skip]
  • Loading branch information
gfgtdf committed Mar 2, 2018
1 parent 160e46a commit ed8bce9
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/terrain/type_data.hpp
Expand Up @@ -21,7 +21,8 @@
class terrain_type_data {
private:
mutable t_translation::ter_list terrainList_;
mutable std::map<t_translation::terrain_code, terrain_type> tcodeToTerrain_;
using tcodeToTerrain_t = std::map<t_translation::terrain_code, terrain_type>;
mutable tcodeToTerrain_t tcodeToTerrain_;

mutable bool initialized_;
const config & game_config_;
Expand Down Expand Up @@ -84,6 +85,8 @@ class terrain_type_data {
*/
bool try_merge_terrains(const t_translation::terrain_code & terrain);

private:
tcodeToTerrain_t::const_iterator find_or_merge(t_translation::terrain_code) const;
};

typedef std::shared_ptr<terrain_type_data> ter_data_cache;

0 comments on commit ed8bce9

Please sign in to comment.