diff options
author | Martin Leitner-Ankerl <martin.ankerl@gmail.com> | 2022-05-02 22:03:12 +0200 |
---|---|---|
committer | Martin Leitner-Ankerl <martin.ankerl@gmail.com> | 2022-05-04 07:34:48 +0200 |
commit | d1a9850102fe572b8a1e00b80c757dd82bf39f9d (patch) | |
tree | 2048d4819e5b7c5deb9bbacc812701e817b81bb0 | |
parent | 0d7efcdf75607e19fac77bcd146773a03af14492 (diff) | |
download | bitcoin-d1a9850102fe572b8a1e00b80c757dd82bf39f9d.tar.xz |
http: replace boost::split with SplitString
Also removes boost/algorithm/string.hpp from expected includes
-rw-r--r-- | src/httprpc.cpp | 8 | ||||
-rwxr-xr-x | test/lint/lint-includes.py | 3 |
2 files changed, 5 insertions, 6 deletions
diff --git a/src/httprpc.cpp b/src/httprpc.cpp index af27ff3506..3bf165495c 100644 --- a/src/httprpc.cpp +++ b/src/httprpc.cpp @@ -21,8 +21,6 @@ #include <string> #include <vector> -#include <boost/algorithm/string.hpp> - /** WWW-Authenticate to present with 401 Unauthorized response */ static const char* WWW_AUTH_HEADER_DATA = "Basic realm=\"jsonrpc\""; @@ -276,8 +274,10 @@ static bool InitRPCAuthentication() std::set<std::string>& whitelist = g_rpc_whitelist[strUser]; if (pos != std::string::npos) { std::string strWhitelist = strRPCWhitelist.substr(pos + 1); - std::set<std::string> new_whitelist; - boost::split(new_whitelist, strWhitelist, boost::is_any_of(", ")); + std::vector<std::string> whitelist_split = SplitString(strWhitelist, ", "); + std::set<std::string> new_whitelist{ + std::make_move_iterator(whitelist_split.begin()), + std::make_move_iterator(whitelist_split.end())}; if (intersect) { std::set<std::string> tmp_whitelist; std::set_intersection(new_whitelist.begin(), new_whitelist.end(), diff --git a/test/lint/lint-includes.py b/test/lint/lint-includes.py index 86ebb814c2..ae62994642 100755 --- a/test/lint/lint-includes.py +++ b/test/lint/lint-includes.py @@ -21,8 +21,7 @@ EXCLUDED_DIRS = ["src/leveldb/", "src/minisketch/", "src/univalue/"] -EXPECTED_BOOST_INCLUDES = ["boost/algorithm/string.hpp", - "boost/algorithm/string/replace.hpp", +EXPECTED_BOOST_INCLUDES = ["boost/algorithm/string/replace.hpp", "boost/date_time/posix_time/posix_time.hpp", "boost/multi_index/hashed_index.hpp", "boost/multi_index/ordered_index.hpp", |