Skip to content

Commit

Permalink
Revert vector_is_sorted to keep PR clean.
Browse files Browse the repository at this point in the history
  • Loading branch information
tanaya-mankad committed Aug 10, 2023
1 parent 42fd4ac commit f4fa9f4
Showing 1 changed file with 3 additions and 10 deletions.
13 changes: 3 additions & 10 deletions include/btwxt/grid-axis.h
Original file line number Diff line number Diff line change
Expand Up @@ -81,16 +81,9 @@ class GridAxis {
// free functions
inline bool vector_is_sorted(const std::vector<double>& vector_in)
{
if (std::is_sorted(std::begin(vector_in), std::end(vector_in)))
{
auto it = std::adjacent_find(vector_in.begin(), vector_in.end());
if (it == vector_in.end())
{
return true;
}
return false;
}
return false;
return std::is_sorted(std::begin(vector_in),
std::end(vector_in),
[](const double a, const double b) { return a <= b; });
}

template <typename T>
Expand Down

0 comments on commit f4fa9f4

Please sign in to comment.