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/sync.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/sync.cpp')
-rw-r--r-- | src/sync.cpp | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/src/sync.cpp b/src/sync.cpp index d32202b701..94f2cafa98 100644 --- a/src/sync.cpp +++ b/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()); |