statistics_dialog: More of "Don't reference temporaries".

https://github.com/wesnoth/wesnoth/pull/4070#discussion_r290087271
This commit is contained in:
josteph 2019-06-05 10:23:30 +00:00
parent d6b30f044d
commit 869c5a43a5

View file

@ -249,7 +249,7 @@ static hitrate_table_element tally(const statistics::stats::hitrate_map& by_cth,
}
const std::vector<double>& final_hp_dist = current_defender->hp_dist;
const auto& chance_of_exactly_N_hits = [&final_hp_dist](int n) { return final_hp_dist[final_hp_dist.size() - 1 - n]; };
const auto chance_of_exactly_N_hits = [&final_hp_dist](int n) { return final_hp_dist[final_hp_dist.size() - 1 - n]; };
double probability_lt = 0.0;
for(unsigned int i = 0; i < overall_hits; ++i) {