mirror of
https://github.com/bitcoin/bitcoin.git
synced 2026-01-20 07:09:15 +01:00
refactor: introduce single-separator split helper SplitString
This helper uses spanparsing::Split internally and enables to replace all calls to boost::split where only a single separator is passed. Co-authored-by: Martin Ankerl <Martin.Ankerl@gmail.com> Co-authored-by: MarcoFalke <falke.marco@gmail.com>
This commit is contained in:
@@ -9,10 +9,9 @@
|
||||
#include <shutdown.h>
|
||||
#include <sync.h>
|
||||
#include <util/strencodings.h>
|
||||
#include <util/string.h>
|
||||
#include <util/system.h>
|
||||
|
||||
#include <boost/algorithm/string/classification.hpp>
|
||||
#include <boost/algorithm/string/split.hpp>
|
||||
#include <boost/signals2/signal.hpp>
|
||||
|
||||
#include <cassert>
|
||||
@@ -407,8 +406,7 @@ static inline JSONRPCRequest transformNamedArguments(const JSONRPCRequest& in, c
|
||||
// Process expected parameters.
|
||||
int hole = 0;
|
||||
for (const std::string &argNamePattern: argNames) {
|
||||
std::vector<std::string> vargNames;
|
||||
boost::algorithm::split(vargNames, argNamePattern, boost::algorithm::is_any_of("|"));
|
||||
std::vector<std::string> vargNames = SplitString(argNamePattern, '|');
|
||||
auto fr = argsIn.end();
|
||||
for (const std::string & argName : vargNames) {
|
||||
fr = argsIn.find(argName);
|
||||
|
||||
Reference in New Issue
Block a user