use Point instead PointRef

This commit is contained in:
Congcong Cai
2023-02-11 04:33:55 +08:00
committed by MistEO
parent 41b99fc03a
commit b3f690da1e

View File

@@ -597,16 +597,16 @@ std::optional<asst::battle::DeploymentOper> asst::RoguelikeBattleTaskPlugin::cal
void asst::RoguelikeBattleTaskPlugin::all_melee_retreat()
{
std::vector<Point const*> retreat_locs{};
std::vector<Point> retreat_locs {};
for (const auto& loc : m_used_tiles | views::keys) {
auto& tile_info = m_normal_tile_info[loc];
auto& type = tile_info.buildable;
if (type == battle::LocationType::Melee || type == battle::LocationType::All) {
retreat_locs.push_back(&loc);
retreat_locs.push_back(loc);
}
}
for (const auto&loc: retreat_locs) {
retreat_oper(*loc);
for (const auto& loc : retreat_locs) {
retreat_oper(loc);
}
}