X-Git-Url: https://git.novaco.in/?p=novacoin.git;a=blobdiff_plain;f=src%2Fsync.cpp;h=b8a17f0e27f639d5257a25d9ee603c40fa9dfd7f;hp=1ac4403beb1f7f68e18b706fb08b128963b09370;hb=5098ea454db9132aa0f576921ca9d1a69429d146;hpb=47d3ceb3da845e216fc9577cbf52f8b5600e5f93 diff --git a/src/sync.cpp b/src/sync.cpp index 1ac4403..b8a17f0 100644 --- a/src/sync.cpp +++ b/src/sync.cpp @@ -5,7 +5,6 @@ #include "sync.h" #include "util.h" -#include #ifdef DEBUG_LOCKCONTENTION void PrintLockContention(const char* pszName, const char* pszFile, int nLine) @@ -58,14 +57,14 @@ static void potential_deadlock_detected(const std::pair& mismatch, { printf("POTENTIAL DEADLOCK DETECTED\n"); printf("Previous lock order was:\n"); - BOOST_FOREACH(const PAIRTYPE(void*, CLockLocation)& i, s2) + for (const auto& i : s2) { if (i.first == mismatch.first) printf(" (1)"); if (i.first == mismatch.second) printf(" (2)"); printf(" %s\n", i.second.ToString().c_str()); } printf("Current lock order is:\n"); - BOOST_FOREACH(const PAIRTYPE(void*, CLockLocation)& i, s1) + for (const auto& i : s1) { if (i.first == mismatch.first) printf(" (1)"); if (i.first == mismatch.second) printf(" (2)"); @@ -84,7 +83,7 @@ static void push_lock(void* c, const CLockLocation& locklocation, bool fTry) (*lockstack).push_back(std::make_pair(c, locklocation)); if (!fTry) { - BOOST_FOREACH(const PAIRTYPE(void*, CLockLocation)& i, (*lockstack)) { + for (const auto& i : (*lockstack)) { if (i.first == c) break; std::pair p1 = std::make_pair(i.first, c);