Make null_location a constant

That seems to make sense and avoid nasty bug
This commit is contained in:
Ali El Gariani 2007-11-04 16:40:08 +00:00
parent 83e039a0cb
commit a973944ee5
2 changed files with 2 additions and 2 deletions

View file

@ -40,7 +40,7 @@ std::ostream &operator<<(std::ostream &s, gamemap::location const &l) {
return s;
}
gamemap::location gamemap::location::null_location;
const gamemap::location gamemap::location::null_location;
const std::string gamemap::default_map_header = "usage=map\nborder_size=1\n\n";
const gamemap::tborder gamemap::default_border = gamemap::SINGLE_TILE_BORDER;

View file

@ -97,7 +97,7 @@ public:
DIRECTION get_relative_dir(location loc) const;
static DIRECTION get_opposite_dir(DIRECTION d);
static location null_location;
static const location null_location;
};
const t_translation::t_list& underlying_mvt_terrain(const location& loc) const
{ return underlying_mvt_terrain(get_terrain(loc)); }