mirror of
https://github.com/wesnoth/wesnoth
synced 2025-05-06 22:36:34 +00:00
simplify a little
This commit is contained in:
parent
53dc3f6dc2
commit
52155bb438
@ -164,13 +164,13 @@ public:
|
|||||||
//on the map. Should be called before indexing using []
|
//on the map. Should be called before indexing using []
|
||||||
bool on_board(const location& loc) const
|
bool on_board(const location& loc) const
|
||||||
{
|
{
|
||||||
return loc.valid() && loc.x < w() && loc.y < h();
|
return loc.valid(w_, h_);
|
||||||
}
|
}
|
||||||
|
|
||||||
//function to tell if the map is of 0 size.
|
//function to tell if the map is of 0 size.
|
||||||
bool empty() const
|
bool empty() const
|
||||||
{
|
{
|
||||||
return w() == 0 || h() == 0;
|
return w_ == 0 || h_ == 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
//function to return a list of the locations of villages on the map
|
//function to return a list of the locations of villages on the map
|
||||||
|
Loading…
x
Reference in New Issue
Block a user