remove an unused function: vacant_villages()

This commit is contained in:
Gunter Labes 2008-01-08 09:35:00 +00:00
parent d9e640b306
commit 12d567263f
3 changed files with 1 additions and 15 deletions

View File

@ -638,19 +638,6 @@ int team::nteams()
}
}
const std::set<gamemap::location> vacant_villages(const std::set<gamemap::location>& villages, const unit_map& units)
{
std::set<gamemap::location> res;
for(std::set<gamemap::location>::const_iterator i = villages.begin(); i != villages.end(); ++i) {
if(units.count(*i) == 0) {
res.insert(*i);
}
}
return res;
}
bool is_observer()
{
if(teams == NULL) {

View File

@ -2798,6 +2798,7 @@ bool unit::invisible(const gamemap::location& loc,
return is_inv;
}
//! Returns the number of units of the given side (team).
int team_units(const unit_map& units, unsigned int side)
{
int res = 0;

View File

@ -430,8 +430,6 @@ struct team_data
team_data calculate_team_data(const class team& tm, int side, const unit_map& units);
const std::set<gamemap::location> vacant_villages(const std::set<gamemap::location>& villages, const unit_map& units);
// This object is used to temporary place a unit in the unit map,
// swapping out any unit that is already there.
// On destruction, it restores the unit map to its original .