Skip to content

Commit

Permalink
Change namespace of cata_algo.h
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
jbytheway committed Dec 22, 2019
1 parent 1bacbe2 commit e7f8190
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions src/cata_algo.h
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
#include <algorithm>
#include <vector>

namespace algo
namespace cata
{

/**
Expand Down Expand Up @@ -41,6 +41,6 @@ void sort_by_rating( Iterator begin, Iterator end, RatingFunction rating_func )
} );
}

} // namespace algo
} // namespace cata

#endif // CATA_ALGO_H
2 changes: 1 addition & 1 deletion src/npcmove.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2600,7 +2600,7 @@ void npc::move_away_from( const std::vector<sphere> &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 );
Expand Down

0 comments on commit e7f8190

Please sign in to comment.