Using assignment is for 1.14. We can use `boost::optional::emplace` here on master.

(cherry-picked from commit 46598681b6)
This commit is contained in:
Charles Dang 2018-03-26 10:46:42 +11:00
parent ebb980a45e
commit c27082b459

View file

@ -131,7 +131,7 @@ void attack_predictions::set_data(window& window, const combatant_data& attacker
boost::optional<decltype(ctx)> opp_ctx;
if(opp_weapon) {
opp_ctx = opp_weapon->specials_context(&defender.unit_, &attacker.unit_, defender.unit_.get_location(), attacker.unit_.get_location(), defender.stats_.is_attacker, weapon);
opp_ctx.emplace(opp_weapon->specials_context(&defender.unit_, &attacker.unit_, defender.unit_.get_location(), attacker.unit_.get_location(), defender.stats_.is_attacker, weapon));
}
// Get damage modifiers.