From e7f81905bb7c5a481fe799471c90d511b6350b45 Mon Sep 17 00:00:00 2001 From: John Bytheway Date: Tue, 10 Dec 2019 21:33:30 -0500 Subject: [PATCH] Change namespace of cata_algo.h If we use any namespace, it should be cata (or a subnamespace thereof). It doesn't make sense to be adding other top-level namespaces. --- src/cata_algo.h | 4 ++-- src/npcmove.cpp | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/cata_algo.h b/src/cata_algo.h index 7337246f30217..a93f27ed18cbf 100644 --- a/src/cata_algo.h +++ b/src/cata_algo.h @@ -5,7 +5,7 @@ #include #include -namespace algo +namespace cata { /** @@ -41,6 +41,6 @@ void sort_by_rating( Iterator begin, Iterator end, RatingFunction rating_func ) } ); } -} // namespace algo +} // namespace cata #endif // CATA_ALGO_H diff --git a/src/npcmove.cpp b/src/npcmove.cpp index bb5afdfad4814..b08ee25201ded 100644 --- a/src/npcmove.cpp +++ b/src/npcmove.cpp @@ -2600,7 +2600,7 @@ void npc::move_away_from( const std::vector &spheres, bool no_bashing ) return g->m.passable( elem ); } ); - algo::sort_by_rating( escape_points.begin(), escape_points.end(), [&]( const tripoint & elem ) { + cata::sort_by_rating( escape_points.begin(), escape_points.end(), [&]( const tripoint & elem ) { const int danger = std::accumulate( spheres.begin(), spheres.end(), 0, [&]( const int sum, const sphere & s ) { return sum + std::max( s.radius - rl_dist( elem, s.center ), 0 );