diff options
author | Jorge Timón <jtimon@jtimon.cc> | 2017-06-02 03:28:42 +0200 |
---|---|---|
committer | Jorge Timón <jtimon@jtimon.cc> | 2017-06-05 20:14:53 +0200 |
commit | 1238f13cf6ccf1177b66df735f360c61ae1dc20b (patch) | |
tree | fd29fef9e9760c49b121f8191307544ae711d426 /src/validation.cpp | |
parent | 18dc3c396299caccb0df31254aaec0d08b70dd2a (diff) |
scripted-diff: Remove PAIRTYPE
-BEGIN VERIFY SCRIPT-
sed -i 's/PAIRTYPE(\([^,]*\), \([^\)]*\))/std::pair<\1, \2>/' ./src/*.h ./src/*.cpp ./src/*/*.h ./src/*/*.cpp ./src/*/*/*.h ./src/*/*/*.cpp ;
sed -i ':a;N;$!ba;s/#define std::pair<t1, t2> std::pair<t1, t2>\n//' ./src/utilstrencodings.h ;
-END VERIFY SCRIPT-
Diffstat (limited to 'src/validation.cpp')
-rw-r--r-- | src/validation.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/validation.cpp b/src/validation.cpp index ddedbdb97d..d07c1437ea 100644 --- a/src/validation.cpp +++ b/src/validation.cpp @@ -3300,13 +3300,13 @@ bool static LoadBlockIndexDB(const CChainParams& chainparams) // Calculate nChainWork std::vector<std::pair<int, CBlockIndex*> > vSortedByHeight; vSortedByHeight.reserve(mapBlockIndex.size()); - for (const PAIRTYPE(uint256, CBlockIndex*)& item : mapBlockIndex) + for (const std::pair<uint256, CBlockIndex*>& item : mapBlockIndex) { CBlockIndex* pindex = item.second; vSortedByHeight.push_back(std::make_pair(pindex->nHeight, pindex)); } sort(vSortedByHeight.begin(), vSortedByHeight.end()); - for (const PAIRTYPE(int, CBlockIndex*)& item : vSortedByHeight) + for (const std::pair<int, CBlockIndex*>& item : vSortedByHeight) { CBlockIndex* pindex = item.second; pindex->nChainWork = (pindex->pprev ? pindex->pprev->nChainWork : 0) + GetBlockProof(*pindex); @@ -3355,7 +3355,7 @@ bool static LoadBlockIndexDB(const CChainParams& chainparams) // Check presence of blk files LogPrintf("Checking all blk files are present...\n"); std::set<int> setBlkDataFiles; - for (const PAIRTYPE(uint256, CBlockIndex*)& item : mapBlockIndex) + for (const std::pair<uint256, CBlockIndex*>& item : mapBlockIndex) { CBlockIndex* pindex = item.second; if (pindex->nStatus & BLOCK_HAVE_DATA) { |