Pass some object parameters as const reference.
This commit is contained in:
parent
8357330fd7
commit
d42bf58eb2
3 changed files with 3 additions and 3 deletions
|
@ -207,7 +207,7 @@ public:
|
|||
* Per-location invalidation called by invalidate_animations()
|
||||
* defaults to no action, overriden by derived classes
|
||||
*/
|
||||
virtual void invalidate_animations_location(gamemap::location /*loc*/) {}
|
||||
virtual void invalidate_animations_location(const gamemap::location& /*loc*/) {}
|
||||
|
||||
const gamemap& get_map()const { return map_;}
|
||||
|
||||
|
|
|
@ -90,7 +90,7 @@ const t_translation::t_list& gamemap::underlying_union_terrain(t_translation::t_
|
|||
}
|
||||
}
|
||||
|
||||
std::string gamemap::get_terrain_string(t_translation::t_terrain terrain) const
|
||||
std::string gamemap::get_terrain_string(const t_translation::t_terrain& terrain) const
|
||||
{
|
||||
std::stringstream ss;
|
||||
const std::string& name = get_terrain_info(terrain).name();
|
||||
|
|
|
@ -54,7 +54,7 @@ public:
|
|||
/**
|
||||
* Get a formatted terrain name -- terrain (underlying, terrains)
|
||||
*/
|
||||
std::string get_terrain_string(t_translation::t_terrain terrain) const;
|
||||
std::string get_terrain_string(const t_translation::t_terrain& terrain) const;
|
||||
|
||||
|
||||
//! Throws exception if the map file is not in the correct format.
|
||||
|
|
Loading…
Add table
Reference in a new issue