diff --git a/src/map_location.cpp b/src/map_location.cpp index 3d0544e56c69..dee602c2c26b 100644 --- a/src/map_location.cpp +++ b/src/map_location.cpp @@ -176,6 +176,11 @@ map_location map_location::get_direction( } } +map_location::DIRECTION map_location::get_relative_dir(const map_location & loc) const +{ + return get_relative_dir(loc, map_location::DEFAULT); +} + map_location::DIRECTION map_location::get_relative_dir(const map_location & loc, map_location::RELATIVE_DIR_MODE opt) const { if (opt == map_location::DEFAULT) { diff --git a/src/map_location.hpp b/src/map_location.hpp index 4e8053e3fdcd..9e30682c894d 100644 --- a/src/map_location.hpp +++ b/src/map_location.hpp @@ -96,7 +96,8 @@ struct map_location { map_location get_direction(DIRECTION d, int n = 1) const; enum RELATIVE_DIR_MODE { DEFAULT , RADIAL_SYMMETRY }; - DIRECTION get_relative_dir(const map_location & loc, map_location::RELATIVE_DIR_MODE mode = map_location::DEFAULT ) const; + DIRECTION get_relative_dir(const map_location & loc, map_location::RELATIVE_DIR_MODE mode /*= map_location::RADIAL_SYMMETRY*/ ) const; + DIRECTION get_relative_dir(const map_location & loc) const; //moved the default setting to .cpp file for ease of testing // Express as a vector in the basis N, NE. N, and NE may be obtained by zero.get_direction(NORTH), ...(NORTH_EAST), respectively. std::pair get_in_basis_N_NE() const;