mirror of
https://github.com/bitcoin/bitcoin.git
synced 2025-11-10 22:18:54 +01:00
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-
This commit is contained in:
10
src/sync.cpp
10
src/sync.cpp
@@ -77,7 +77,7 @@ static void potential_deadlock_detected(const std::pair<void*, void*>& mismatch,
|
||||
{
|
||||
LogPrintf("POTENTIAL DEADLOCK DETECTED\n");
|
||||
LogPrintf("Previous lock order was:\n");
|
||||
for (const PAIRTYPE(void*, CLockLocation) & i : s2) {
|
||||
for (const std::pair<void*, CLockLocation> & i : s2) {
|
||||
if (i.first == mismatch.first) {
|
||||
LogPrintf(" (1)");
|
||||
}
|
||||
@@ -87,7 +87,7 @@ static void potential_deadlock_detected(const std::pair<void*, void*>& mismatch,
|
||||
LogPrintf(" %s\n", i.second.ToString());
|
||||
}
|
||||
LogPrintf("Current lock order is:\n");
|
||||
for (const PAIRTYPE(void*, CLockLocation) & i : s1) {
|
||||
for (const std::pair<void*, CLockLocation> & i : s1) {
|
||||
if (i.first == mismatch.first) {
|
||||
LogPrintf(" (1)");
|
||||
}
|
||||
@@ -108,7 +108,7 @@ static void push_lock(void* c, const CLockLocation& locklocation, bool fTry)
|
||||
|
||||
(*lockstack).push_back(std::make_pair(c, locklocation));
|
||||
|
||||
for (const PAIRTYPE(void*, CLockLocation) & i : (*lockstack)) {
|
||||
for (const std::pair<void*, CLockLocation> & i : (*lockstack)) {
|
||||
if (i.first == c)
|
||||
break;
|
||||
|
||||
@@ -142,14 +142,14 @@ void LeaveCritical()
|
||||
std::string LocksHeld()
|
||||
{
|
||||
std::string result;
|
||||
for (const PAIRTYPE(void*, CLockLocation) & i : *lockstack)
|
||||
for (const std::pair<void*, CLockLocation> & i : *lockstack)
|
||||
result += i.second.ToString() + std::string("\n");
|
||||
return result;
|
||||
}
|
||||
|
||||
void AssertLockHeldInternal(const char* pszName, const char* pszFile, int nLine, void* cs)
|
||||
{
|
||||
for (const PAIRTYPE(void*, CLockLocation) & i : *lockstack)
|
||||
for (const std::pair<void*, CLockLocation> & i : *lockstack)
|
||||
if (i.first == cs)
|
||||
return;
|
||||
fprintf(stderr, "Assertion failed: lock %s not held in %s:%i; locks held:\n%s", pszName, pszFile, nLine, LocksHeld().c_str());
|
||||
|
||||
Reference in New Issue
Block a user