Display Context: move has_team implementation out of header
This commit is contained in:
parent
a2e50f56c4
commit
712e66f9ef
2 changed files with 6 additions and 6 deletions
|
@ -26,6 +26,11 @@ const team& display_context::get_team(int side) const
|
|||
return teams().at(side - 1);
|
||||
}
|
||||
|
||||
bool display_context::has_team(int side) const
|
||||
{
|
||||
return side > 0 && side <= static_cast<int>(teams().size());
|
||||
}
|
||||
|
||||
bool display_context::would_be_discovered(const map_location & loc, int side_num, bool see_all)
|
||||
{
|
||||
for(const map_location& u_loc : get_adjacent_tiles(loc)) {
|
||||
|
|
|
@ -43,12 +43,7 @@ public:
|
|||
/** This getter takes a 1-based side number, not a 0-based team number. */
|
||||
const team& get_team(int side) const;
|
||||
|
||||
// this one is only a template function to prevent compilation erros when class team is an incomplete type.
|
||||
template<typename T = void>
|
||||
bool has_team(int side) const
|
||||
{
|
||||
return side > 0 && side <= static_cast<int>(teams().size());
|
||||
}
|
||||
bool has_team(int side) const;
|
||||
|
||||
// Helper for is_visible_to_team
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue