C++20 Round 4: enum class TxnOutType, remove boost string alg, boost::int64_t -> int64_t
- txnouttype -> enum class TxnOutType (NonStandard, PubKey, PubKeyHash, ScriptHash, MultiSig) Updated script.h/cpp, main.cpp, wallet.cpp, rpcrawtransaction.cpp, rpcwallet.cpp, multisig_tests.cpp - boost::int64_t/uint64_t -> int64_t/uint64_t across all RPC files (7 files, 52 replacements) - Replace all boost string algorithm includes with std:: equivalents: - Added TrimString(), ToLower(), ReplaceAll(), SplitString(), JoinStrings() to util.h - boost::trim -> TrimString() (bootstrap.cpp, trianglesrpc.cpp, rest.cpp) - boost::to_lower -> ToLower() (netbase.cpp, trianglesrpc.cpp) - boost::split/is_any_of -> SplitString() (rpcdump.cpp, trianglesrpc.cpp, rest.cpp) - boost::replace_all -> ReplaceAll() (main.cpp, wallet.cpp) - boost::algorithm::starts_with/ends_with -> std::string::starts_with/ends_with (rpcdump.cpp, smessage.cpp) - boost::algorithm::istarts_with -> case-insensitive lambda (init.cpp, qtipcserver.cpp) - boost::algorithm::join -> JoinStrings() (util.cpp) - boost::bind -> lambda in trianglesrpc.cpp async_accept handler - IsHex() parameter: const string& -> string_view
This commit is contained in:
+1
-2
@@ -30,7 +30,6 @@
|
||||
#include <filesystem>
|
||||
#include <fstream>
|
||||
#include <boost/interprocess/sync/file_lock.hpp>
|
||||
#include <boost/algorithm/string/predicate.hpp>
|
||||
#include <openssl/crypto.h>
|
||||
|
||||
#ifndef WIN32
|
||||
@@ -339,7 +338,7 @@ bool AppInit(int argc, char* argv[])
|
||||
|
||||
// Command-line RPC
|
||||
for (int i = 1; i < argc; i++)
|
||||
if (!IsSwitchChar(argv[i][0]) && !boost::algorithm::istarts_with(argv[i], "Triangles:"))
|
||||
if (!IsSwitchChar(argv[i][0]) && !std::equal(std::begin("Triangles:"), std::end("Triangles:") - 1, argv[i], [](char a, char b) { return std::tolower(static_cast<unsigned char>(a)) == std::tolower(static_cast<unsigned char>(b)); }))
|
||||
fCommandLine = true;
|
||||
|
||||
if (fCommandLine)
|
||||
|
||||
Reference in New Issue
Block a user