Skip to content

Commit

Permalink
refactor: don't depend on <ranges> just for one algorithm
Browse files Browse the repository at this point in the history
  • Loading branch information
mhx committed Jan 23, 2024
1 parent 93252d7 commit 905ac66
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions src/dwarfs/inode_manager.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,6 @@
#include <limits>
#include <numeric>
#include <ostream>
#include <ranges>
#include <string>
#include <string_view>
#include <unordered_map>
Expand Down Expand Up @@ -93,8 +92,8 @@ class inode_ : public inode {
bool has_category(fragment_category cat) const override {
DWARFS_CHECK(!fragments_.empty(),
"has_category() called with no fragments");
return std::ranges::any_of(
fragments_, [cat](auto const& f) { return f.category() == cat; });
return std::any_of(fragments_.begin(), fragments_.end(),
[cat](auto const& f) { return f.category() == cat; });
}

std::optional<uint32_t>
Expand Down

0 comments on commit 905ac66

Please sign in to comment.