remove unused cctors
This commit is contained in:
parent
2dd7e87039
commit
e1c66ae215
2 changed files with 0 additions and 27 deletions
|
@ -428,30 +428,6 @@ battle_context::battle_context(const battle_context_unit_stats& att, const battl
|
|||
{
|
||||
}
|
||||
|
||||
battle_context::battle_context(const battle_context& other)
|
||||
: attacker_stats_(nullptr)
|
||||
, defender_stats_(nullptr)
|
||||
, attacker_combatant_(nullptr)
|
||||
, defender_combatant_(nullptr)
|
||||
{
|
||||
*this = other;
|
||||
}
|
||||
|
||||
battle_context& battle_context::operator=(const battle_context& other)
|
||||
{
|
||||
if(&other != this) {
|
||||
attacker_stats_.reset(new battle_context_unit_stats(*other.attacker_stats_));
|
||||
defender_stats_.reset(new battle_context_unit_stats(*other.defender_stats_));
|
||||
|
||||
attacker_combatant_.reset(other.attacker_combatant_
|
||||
? new combatant(*other.attacker_combatant_, *attacker_stats_) : nullptr);
|
||||
|
||||
defender_combatant_.reset(other.defender_combatant_
|
||||
? new combatant(*other.defender_combatant_, *defender_stats_) : nullptr);
|
||||
}
|
||||
|
||||
return *this;
|
||||
}
|
||||
|
||||
/** @todo FIXME: better to initialize combatant initially (move into
|
||||
battle_context_unit_stats?), just do fight() when required. */
|
||||
|
|
|
@ -188,11 +188,8 @@ public:
|
|||
/** Used by the AI which caches battle_context_unit_stats */
|
||||
battle_context(const battle_context_unit_stats& att, const battle_context_unit_stats& def);
|
||||
|
||||
battle_context(const battle_context& other);
|
||||
|
||||
battle_context(battle_context&& other) = default;
|
||||
|
||||
battle_context& operator=(const battle_context& other);
|
||||
battle_context& operator=(battle_context&& other) = default;
|
||||
|
||||
/** This method returns the statistics of the attacker. */
|
||||
|
|
Loading…
Add table
Reference in a new issue