The Battle for Wesnoth  1.19.5+dev
Functions
pathutils_impl.hpp File Reference
#include "map/location.hpp"
#include <set>
Include dependency graph for pathutils_impl.hpp:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Functions

template<typename FPred1 , typename FPred2 >
void get_tiles_radius (std::set< map_location > &&locs, size_t radius, std::set< map_location > &result, const FPred1 &pred1, const FPred2 &pred2)
 Function that will add to result all elements of locs, plus all on-board (that is: all locs that match pred1) locations matching pred2 that are connected to elements of locs by a chain of at most radius tiles, each of which matches pred2. More...
 

Function Documentation

◆ get_tiles_radius()

template<typename FPred1 , typename FPred2 >
void get_tiles_radius ( std::set< map_location > &&  locs,
size_t  radius,
std::set< map_location > &  result,
const FPred1 &  pred1,
const FPred2 &  pred2 
)

Function that will add to result all elements of locs, plus all on-board (that is: all locs that match pred1) locations matching pred2 that are connected to elements of locs by a chain of at most radius tiles, each of which matches pred2.

result must be a std::set of locations.

pred1 a fast predicate (used before cachecheck). pred2 a slow predicate (used after cachecheck).

Definition at line 31 of file pathutils_impl.hpp.

References get_adjacent_tiles().