mirror of
https://github.com/dogecoin/dogecoin.git
synced 2026-01-31 10:30:52 +00:00
cleanup: remove unneccesary boost dependencies from sync.cpp
Removes boost dependencies in sync.cpp in favor of standard c++ for-loops, improving readability.
This commit is contained in:
parent
06e4040717
commit
a9129315f5
@ -9,8 +9,6 @@
|
||||
|
||||
#include <stdio.h>
|
||||
|
||||
#include <boost/foreach.hpp>
|
||||
#include <boost/thread.hpp>
|
||||
#include <thread>
|
||||
#include <unordered_map>
|
||||
#include <utility>
|
||||
@ -86,7 +84,7 @@ static void potential_deadlock_detected(const LockPair& mismatch, const LockStac
|
||||
{
|
||||
LogPrintf("POTENTIAL DEADLOCK DETECTED\n");
|
||||
LogPrintf("Previous lock order was:\n");
|
||||
BOOST_FOREACH (const LockStackItem& i, s2) {
|
||||
for (const LockStackItem& i : s2) {
|
||||
if (i.first == mismatch.first) {
|
||||
LogPrintf(" (1)");
|
||||
}
|
||||
@ -96,7 +94,7 @@ static void potential_deadlock_detected(const LockPair& mismatch, const LockStac
|
||||
LogPrintf(" %s\n", i.second.ToString());
|
||||
}
|
||||
LogPrintf("Current lock order is:\n");
|
||||
BOOST_FOREACH (const LockStackItem& i, s1) {
|
||||
for (const LockStackItem& i : s1) {
|
||||
if (i.first == mismatch.first) {
|
||||
LogPrintf(" (1)");
|
||||
}
|
||||
@ -116,7 +114,7 @@ static void push_lock(void* c, const CLockLocation& locklocation, bool fTry)
|
||||
LockStack& lock_stack = lockdata.m_lock_stacks[std::this_thread::get_id()];
|
||||
lock_stack.emplace_back(c, locklocation);
|
||||
|
||||
BOOST_FOREACH (const LockStackItem& i, lock_stack) {
|
||||
for (const LockStackItem& i : lock_stack) {
|
||||
if (i.first == c)
|
||||
break;
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user