Skip to content

Commit d1a9850

Browse files
committed
http: replace boost::split with SplitString
Also removes boost/algorithm/string.hpp from expected includes
1 parent 0d7efcd commit d1a9850

File tree

2 files changed

+5
-6
lines changed

2 files changed

+5
-6
lines changed

src/httprpc.cpp

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -21,8 +21,6 @@
2121
#include <string>
2222
#include <vector>
2323

24-
#include <boost/algorithm/string.hpp>
25-
2624
/** WWW-Authenticate to present with 401 Unauthorized response */
2725
static const char* WWW_AUTH_HEADER_DATA = "Basic realm=\"jsonrpc\"";
2826

@@ -276,8 +274,10 @@ static bool InitRPCAuthentication()
276274
std::set<std::string>& whitelist = g_rpc_whitelist[strUser];
277275
if (pos != std::string::npos) {
278276
std::string strWhitelist = strRPCWhitelist.substr(pos + 1);
279-
std::set<std::string> new_whitelist;
280-
boost::split(new_whitelist, strWhitelist, boost::is_any_of(", "));
277+
std::vector<std::string> whitelist_split = SplitString(strWhitelist, ", ");
278+
std::set<std::string> new_whitelist{
279+
std::make_move_iterator(whitelist_split.begin()),
280+
std::make_move_iterator(whitelist_split.end())};
281281
if (intersect) {
282282
std::set<std::string> tmp_whitelist;
283283
std::set_intersection(new_whitelist.begin(), new_whitelist.end(),

test/lint/lint-includes.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,8 +21,7 @@
2121
"src/minisketch/",
2222
"src/univalue/"]
2323

24-
EXPECTED_BOOST_INCLUDES = ["boost/algorithm/string.hpp",
25-
"boost/algorithm/string/replace.hpp",
24+
EXPECTED_BOOST_INCLUDES = ["boost/algorithm/string/replace.hpp",
2625
"boost/date_time/posix_time/posix_time.hpp",
2726
"boost/multi_index/hashed_index.hpp",
2827
"boost/multi_index/ordered_index.hpp",

0 commit comments

Comments
 (0)