|
|
|
@ -41,7 +41,7 @@ inline void find_neighbor(const PointEntityMap &table, EntityList &result, Point |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
std::tuple<bool, EntityList> spatial_map::neighbors(Point cell, bool diag) const { |
|
|
|
|
FoundEntities spatial_map::neighbors(Point cell, bool diag) const { |
|
|
|
|
EntityList result; |
|
|
|
|
|
|
|
|
|
// just unroll the loop since we only check four directions
|
|
|
|
@ -58,5 +58,5 @@ std::tuple<bool, EntityList> spatial_map::neighbors(Point cell, bool diag) const |
|
|
|
|
find_neighbor(table, result, cell, -1, 1); // north west
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
return std::tuple(!result.empty(), result); |
|
|
|
|
return {!result.empty(), result}; |
|
|
|
|
} |
|
|
|
|