mirror of
https://github.com/wesnoth/wesnoth
synced 2025-05-05 19:59:58 +00:00
Pass parameter by const ref instead of const value.
Issue found by cppcheck.
This commit is contained in:
parent
6295c88501
commit
0cadc0a931
@ -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;
|
||||
|
@ -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.
|
||||
|
Loading…
x
Reference in New Issue
Block a user