Fix unused variable and parameter warnings from gcc
Deals with the following warnings (errors in strict mode) by removing the offending code and dropping a parameter name, respectively. src/pathfind/teleport.cpp: In member function ‘void pathfind::teleport_group::get_teleport_pair(pathfind::teleport_pair&, const unit&, bool) const’: src/pathfind/teleport.cpp:70:12: error: variable ‘units’ set but not used [-Werror=unused-but-set-variable] src/pathfind/teleport.cpp:66:16: error: unused parameter ‘ignore_units’ [-Werror=unused-parameter] iceiceice, you probably should take a look at this.
This commit is contained in:
parent
ec52e2e0cd
commit
ffbf683eb0
1 changed files with 2 additions and 7 deletions
|
@ -63,16 +63,11 @@ teleport_group::teleport_group(const vconfig& cfg, bool reversed) : cfg_(cfg.get
|
|||
void teleport_group::get_teleport_pair(
|
||||
teleport_pair& loc_pair
|
||||
, const unit& u
|
||||
, const bool ignore_units) const
|
||||
, const bool /*ignore_units*/) const
|
||||
{
|
||||
const map_location &loc = u.get_location();
|
||||
static unit_map empty_unit_map;
|
||||
unit_map *units;
|
||||
if (ignore_units) {
|
||||
units = &empty_unit_map;
|
||||
} else {
|
||||
units = resources::units;
|
||||
}
|
||||
|
||||
vconfig filter(cfg_.child_or_empty("filter"), true);
|
||||
vconfig source(cfg_.child_or_empty("source"), true);
|
||||
vconfig target(cfg_.child_or_empty("target"), true);
|
||||
|
|
Loading…
Add table
Reference in a new issue