Skip to content

Commit

Permalink
AI/aspect_attacks_base: pass an std::aray to do_attack_analysis
Browse files Browse the repository at this point in the history
  • Loading branch information
Vultraz committed Jan 16, 2021
1 parent 76389cb commit 79b6887
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
6 changes: 3 additions & 3 deletions src/ai/default/aspect_attacks.cpp
Expand Up @@ -90,8 +90,8 @@ std::shared_ptr<attacks_vector> aspect_attacks_base::analyze_targets() const
}
}

bool used_locations[6];
std::fill(used_locations,used_locations+6,false);
std::array<bool, 6> used_locations;
used_locations.fill(false);

moves_map dummy_moves;
move_map fullmove_srcdst, fullmove_dstsrc;
Expand Down Expand Up @@ -130,7 +130,7 @@ void aspect_attacks_base::do_attack_analysis(const map_location& loc,
const move_map& enemy_srcdst,
const move_map& enemy_dstsrc,
const adjacent_loc_array_t& tiles,
bool* used_locations,
std::array<bool, 6>& used_locations,
std::vector<map_location>& units,
std::vector<attack_analysis>& result,
attack_analysis& cur_analysis,
Expand Down
2 changes: 1 addition & 1 deletion src/ai/default/aspect_attacks.hpp
Expand Up @@ -48,7 +48,7 @@ class aspect_attacks_base : public typesafe_aspect<attacks_vector> {
const move_map& enemy_srcdst,
const move_map& enemy_dstsrc,
const adjacent_loc_array_t& tiles,
bool* used_locations,
std::array<bool, 6>& used_locations,
std::vector<map_location>& units,
std::vector<attack_analysis>& result,
attack_analysis& cur_analysis,
Expand Down

0 comments on commit 79b6887

Please sign in to comment.