Pass parameter by const ref instead of const value.

Issue found by cppcheck.
This commit is contained in:
Mark de Wever 2009-10-02 19:25:16 +00:00
parent 6295c88501
commit 0cadc0a931
2 changed files with 2 additions and 2 deletions

View File

@ -149,7 +149,7 @@ void move_unit_spectator::set_unit(const unit_map::const_iterator &u)
unit_ = u;
}
bool can_recruit_on(const gamemap& map, const map_location& leader, const map_location loc)
bool can_recruit_on(const gamemap& map, const map_location& leader, const map_location& loc)
{
if(!map.on_board(loc))
return false;

View File

@ -36,7 +36,7 @@ class unit;
#include <deque>
#include <sstream>
bool can_recruit_on(const gamemap& map, const map_location& leader, const map_location loc);
bool can_recruit_on(const gamemap& map, const map_location& leader, const map_location& loc);
/**
* Finds a location to place a unit.