scripted-diff: Fully remove BOOST_FOREACH
-BEGIN VERIFY SCRIPT- sed -i 's/BOOST_FOREACH *(\(.*\),/for (\1 :/' ./src/*.h ./src/*.cpp ./src/*/*.h ./src/*/*.cpp ./src/*/*/*.h ./src/*/*/*.cpp ; -END VERIFY SCRIPT-
This commit is contained in:
@@ -93,7 +93,7 @@ void RunTest(const TestVector &test) {
|
||||
CExtPubKey pubkey;
|
||||
key.SetMaster(&seed[0], seed.size());
|
||||
pubkey = key.Neuter();
|
||||
BOOST_FOREACH(const TestDerivation &derive, test.vDerive) {
|
||||
for (const TestDerivation &derive : test.vDerive) {
|
||||
unsigned char data[74];
|
||||
key.Encode(data);
|
||||
pubkey.Encode(data);
|
||||
|
||||
@@ -194,7 +194,7 @@ BOOST_AUTO_TEST_CASE(coins_cache_simulation_test)
|
||||
found_an_entry = true;
|
||||
}
|
||||
}
|
||||
BOOST_FOREACH(const CCoinsViewCacheTest *test, stack) {
|
||||
for (const CCoinsViewCacheTest *test : stack) {
|
||||
test->SelfTest();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -25,7 +25,7 @@ static void ResetArgs(const std::string& strArg)
|
||||
|
||||
// Convert to char*:
|
||||
std::vector<const char*> vecChar;
|
||||
BOOST_FOREACH(std::string& s, vecArg)
|
||||
for (std::string& s : vecArg)
|
||||
vecChar.push_back(s.c_str());
|
||||
|
||||
ParseParameters(vecChar.size(), &vecChar[0]);
|
||||
|
||||
@@ -28,7 +28,7 @@ sign_multisig(CScript scriptPubKey, std::vector<CKey> keys, CTransaction transac
|
||||
|
||||
CScript result;
|
||||
result << OP_0; // CHECKMULTISIG bug workaround
|
||||
BOOST_FOREACH(const CKey &key, keys)
|
||||
for (const CKey &key : keys)
|
||||
{
|
||||
std::vector<unsigned char> vchSig;
|
||||
BOOST_CHECK(key.Sign(hash, vchSig));
|
||||
|
||||
@@ -54,13 +54,13 @@ class prevector_tester {
|
||||
local_check(pretype(real_vector.begin(), real_vector.end()) == pre_vector);
|
||||
local_check(pretype(pre_vector.begin(), pre_vector.end()) == pre_vector);
|
||||
size_t pos = 0;
|
||||
BOOST_FOREACH(const T& v, pre_vector) {
|
||||
for (const T& v : pre_vector) {
|
||||
local_check(v == real_vector[pos++]);
|
||||
}
|
||||
BOOST_REVERSE_FOREACH(const T& v, pre_vector) {
|
||||
local_check(v == real_vector[--pos]);
|
||||
}
|
||||
BOOST_FOREACH(const T& v, const_pre_vector) {
|
||||
for (const T& v : const_pre_vector) {
|
||||
local_check(v == real_vector[pos++]);
|
||||
}
|
||||
BOOST_REVERSE_FOREACH(const T& v, const_pre_vector) {
|
||||
|
||||
@@ -927,7 +927,7 @@ BOOST_AUTO_TEST_CASE(script_build)
|
||||
|
||||
std::string strGen;
|
||||
|
||||
BOOST_FOREACH(TestBuilder& test, tests) {
|
||||
for (TestBuilder& test : tests) {
|
||||
test.Test();
|
||||
std::string str = JSONPrettyPrint(test.GetJSON());
|
||||
#ifndef UPDATE_JSON_TESTS
|
||||
@@ -1033,7 +1033,7 @@ sign_multisig(CScript scriptPubKey, std::vector<CKey> keys, CTransaction transac
|
||||
// and vice-versa)
|
||||
//
|
||||
result << OP_0;
|
||||
BOOST_FOREACH(const CKey &key, keys)
|
||||
for (const CKey &key : keys)
|
||||
{
|
||||
std::vector<unsigned char> vchSig;
|
||||
BOOST_CHECK(key.Sign(hash, vchSig));
|
||||
|
||||
@@ -121,7 +121,7 @@ TestChain100Setup::CreateAndProcessBlock(const std::vector<CMutableTransaction>&
|
||||
|
||||
// Replace mempool-selected txns with just coinbase plus passed-in txns:
|
||||
block.vtx.resize(1);
|
||||
BOOST_FOREACH(const CMutableTransaction& tx, txns)
|
||||
for (const CMutableTransaction& tx : txns)
|
||||
block.vtx.push_back(MakeTransactionRef(tx));
|
||||
// IncrementExtraNonce creates a valid coinbase and merkleRoot
|
||||
unsigned int extraNonce = 0;
|
||||
|
||||
@@ -66,7 +66,7 @@ unsigned int ParseScriptFlags(std::string strFlags)
|
||||
std::vector<std::string> words;
|
||||
boost::algorithm::split(words, strFlags, boost::algorithm::is_any_of(","));
|
||||
|
||||
BOOST_FOREACH(std::string word, words)
|
||||
for (std::string word : words)
|
||||
{
|
||||
if (!mapFlagNames.count(word))
|
||||
BOOST_ERROR("Bad test: unknown verification flag '" << word << "'");
|
||||
@@ -394,7 +394,7 @@ void CheckWithFlag(const CTransactionRef& output, const CMutableTransaction& inp
|
||||
static CScript PushAll(const std::vector<valtype>& values)
|
||||
{
|
||||
CScript result;
|
||||
BOOST_FOREACH(const valtype& v, values) {
|
||||
for (const valtype& v : values) {
|
||||
if (v.size() == 0) {
|
||||
result << OP_0;
|
||||
} else if (v.size() == 1 && v[0] >= 1 && v[0] <= 16) {
|
||||
|
||||
Reference in New Issue
Block a user