mirror of
https://github.com/bitcoin/bitcoin.git
synced 2025-11-12 15:09:59 +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:
@@ -11,8 +11,8 @@
|
||||
#include <streams.h>
|
||||
#include <univalue.h>
|
||||
#include <util/strencodings.h>
|
||||
#include <util/string.h>
|
||||
|
||||
#include <boost/algorithm/string.hpp>
|
||||
#include <cstdint>
|
||||
#include <string>
|
||||
#include <vector>
|
||||
@@ -130,8 +130,7 @@ unsigned int ParseScriptFlags(const std::string& str)
|
||||
if (str.empty()) return 0;
|
||||
|
||||
unsigned int flags = 0;
|
||||
std::vector<std::string> words;
|
||||
boost::algorithm::split(words, str, boost::algorithm::is_any_of(","));
|
||||
std::vector<std::string> words = SplitString(str, ',');
|
||||
|
||||
for (const std::string& word : words) {
|
||||
auto it = FLAG_NAMES.find(word);
|
||||
|
||||
Reference in New Issue
Block a user