mirror of
https://github.com/wesnoth/wesnoth
synced 2025-05-10 06:48:44 +00:00
Change const variables by const values.
Issue found by cppcheck.
This commit is contained in:
parent
2831b084b8
commit
dc7c1bbb30
@ -110,7 +110,6 @@ void attack_analysis::analyze(const gamemap& map, unit_map& units,
|
||||
m_aggression = ai_obj.get_leader_aggression();
|
||||
}
|
||||
|
||||
int att_weapon = -1, def_weapon = -1;
|
||||
bool from_cache = false;
|
||||
battle_context *bc;
|
||||
|
||||
@ -131,7 +130,7 @@ void attack_analysis::analyze(const gamemap& map, unit_map& units,
|
||||
from_cache = true;
|
||||
bc = new battle_context(usc->second.first, usc->second.second);
|
||||
} else {
|
||||
bc = new battle_context(units, m->second, target, att_weapon, def_weapon, m_aggression, prev_def);
|
||||
bc = new battle_context(units, m->second, target, -1, -1, m_aggression, prev_def);
|
||||
}
|
||||
const combatant &att = bc->get_attacker_combatant(prev_def);
|
||||
const combatant &def = bc->get_defender_combatant(prev_def);
|
||||
|
Loading…
x
Reference in New Issue
Block a user