mirror of
https://github.com/mhx/dwarfs.git
synced 2025-09-08 11:59:48 -04:00
refactor: use folly::split instead of boost::split
This commit is contained in:
parent
896ad249b8
commit
93252d7935
@ -43,11 +43,12 @@
|
||||
#include <io.h>
|
||||
#endif
|
||||
|
||||
#include <boost/algorithm/string.hpp>
|
||||
#include <boost/algorithm/string/join.hpp>
|
||||
#include <boost/program_options.hpp>
|
||||
|
||||
#include <folly/Conv.h>
|
||||
#include <folly/FileUtil.h>
|
||||
#include <folly/String.h>
|
||||
#include <folly/gen/String.h>
|
||||
#include <folly/portability/SysStat.h>
|
||||
#include <folly/system/HardwareConcurrency.h>
|
||||
@ -835,7 +836,10 @@ int mkdwarfs_main(int argc, sys_char** argv, iolayer const& iol) {
|
||||
rw_opts.recompress_categories_exclude = true;
|
||||
input.remove_prefix(1);
|
||||
}
|
||||
boost::split(rw_opts.recompress_categories, input, boost::is_any_of(","));
|
||||
folly::splitTo<std::string>(
|
||||
',', input,
|
||||
std::inserter(rw_opts.recompress_categories,
|
||||
rw_opts.recompress_categories.end()));
|
||||
}
|
||||
}
|
||||
|
||||
@ -924,7 +928,7 @@ int mkdwarfs_main(int argc, sys_char** argv, iolayer const& iol) {
|
||||
}
|
||||
|
||||
std::vector<std::string_view> chmod_exprs;
|
||||
boost::split(chmod_exprs, chmod_str, boost::is_any_of(","));
|
||||
folly::split(',', chmod_str, chmod_exprs);
|
||||
|
||||
// I'm pretty certain these warnings by Flawfinder are false positives.
|
||||
// After all, we're just doing a no-op by re-setting the original value
|
||||
@ -992,8 +996,8 @@ int mkdwarfs_main(int argc, sys_char** argv, iolayer const& iol) {
|
||||
options.pack_symlinks = true;
|
||||
options.pack_symlinks_index = false;
|
||||
} else {
|
||||
std::vector<std::string> pack_opts;
|
||||
boost::split(pack_opts, pack_metadata, boost::is_any_of(","));
|
||||
std::vector<std::string_view> pack_opts;
|
||||
folly::split(',', pack_metadata, pack_opts);
|
||||
for (auto const& opt : pack_opts) {
|
||||
if (opt == "chunk_table") {
|
||||
options.pack_chunk_table = true;
|
||||
@ -1130,7 +1134,7 @@ int mkdwarfs_main(int argc, sys_char** argv, iolayer const& iol) {
|
||||
|
||||
if (!categorizer_list.value.empty()) {
|
||||
std::vector<std::string> categorizers;
|
||||
boost::split(categorizers, categorizer_list.value, boost::is_any_of(","));
|
||||
folly::split(',', categorizer_list.value, categorizers);
|
||||
|
||||
options.inode.categorizer_mgr = std::make_shared<categorizer_manager>(lgr);
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user