From 93252d7935c8bb7ba2c078e34377d7b0bc9b6929 Mon Sep 17 00:00:00 2001 From: Marcus Holland-Moritz Date: Tue, 23 Jan 2024 15:30:37 +0100 Subject: [PATCH] refactor: use folly::split instead of boost::split --- src/mkdwarfs_main.cpp | 16 ++++++++++------ 1 file changed, 10 insertions(+), 6 deletions(-) diff --git a/src/mkdwarfs_main.cpp b/src/mkdwarfs_main.cpp index 74e65e2c..7261059a 100644 --- a/src/mkdwarfs_main.cpp +++ b/src/mkdwarfs_main.cpp @@ -43,11 +43,12 @@ #include #endif -#include +#include #include #include #include +#include #include #include #include @@ -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( + ',', 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 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 pack_opts; - boost::split(pack_opts, pack_metadata, boost::is_any_of(",")); + std::vector 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 categorizers; - boost::split(categorizers, categorizer_list.value, boost::is_any_of(",")); + folly::split(',', categorizer_list.value, categorizers); options.inode.categorizer_mgr = std::make_shared(lgr);