mirror of
https://github.com/mhx/dwarfs.git
synced 2025-08-03 17:56:12 -04:00
refactor(metadata_v2): use std::stable_sort instead of boost algo
This commit is contained in:
parent
5cc6da0bda
commit
132e020742
@ -39,8 +39,6 @@
|
||||
|
||||
#include <boost/algorithm/string.hpp>
|
||||
|
||||
#include <boost/sort/flat_stable_sort/flat_stable_sort.hpp>
|
||||
|
||||
#include <thrift/lib/cpp2/frozen/FrozenUtil.h>
|
||||
#include <thrift/lib/cpp2/protocol/DebugProtocol.h>
|
||||
#include <thrift/lib/cpp2/protocol/Serializer.h>
|
||||
@ -955,9 +953,8 @@ metadata_v2_data::build_dir_icase_cache(logger& lgr) const {
|
||||
if (!std::ranges::is_sorted(names)) {
|
||||
std::vector<uint32_t> entries(range.size());
|
||||
std::iota(entries.begin(), entries.end(), 0);
|
||||
boost::sort::flat_stable_sort(
|
||||
entries.begin(), entries.end(),
|
||||
[&](auto a, auto b) { return names[a] < names[b]; });
|
||||
std::ranges::stable_sort(
|
||||
entries, [&](auto a, auto b) { return names[a] < names[b]; });
|
||||
auto& pv = cache[inode];
|
||||
pv.reset(std::bit_width(entries.size()), entries.size());
|
||||
for (size_t i = 0; i < entries.size(); ++i) {
|
||||
|
Loading…
x
Reference in New Issue
Block a user