diff options
author | Wladimir J. van der Laan <laanwj@gmail.com> | 2014-01-16 16:15:27 +0100 |
---|---|---|
committer | Wladimir J. van der Laan <laanwj@gmail.com> | 2014-01-23 16:05:01 +0100 |
commit | 7d9d134bf95cb6a2ce9623c7e6a3535432a61af2 (patch) | |
tree | eeca53e065947846648d9373f240d593c0c0ecfc /src/sync.cpp | |
parent | b77dfdc9e36e308aa806d63aa3b5628971789d5a (diff) |
Remove redundant .c_str()s
After the tinyformat switch sprintf() family functions support passing
actual std::string objects.
Remove unnecessary c_str calls (236 of them) in logging and formatting.
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 b57d8c3c00..8f713807f7 100644 --- a/src/sync.cpp +++ b/src/sync.cpp @@ -65,14 +65,14 @@ static void potential_deadlock_detected(const std::pair<void*, void*>& mismatch, { if (i.first == mismatch.first) LogPrintf(" (1)"); if (i.first == mismatch.second) LogPrintf(" (2)"); - LogPrintf(" %s\n", i.second.ToString().c_str()); + LogPrintf(" %s\n", i.second.ToString()); } LogPrintf("Current lock order is:\n"); BOOST_FOREACH(const PAIRTYPE(void*, CLockLocation)& i, s1) { if (i.first == mismatch.first) LogPrintf(" (1)"); if (i.first == mismatch.second) LogPrintf(" (2)"); - LogPrintf(" %s\n", i.second.ToString().c_str()); + LogPrintf(" %s\n", i.second.ToString()); } } @@ -81,7 +81,7 @@ static void push_lock(void* c, const CLockLocation& locklocation, bool fTry) if (lockstack.get() == NULL) lockstack.reset(new LockStack); - LogPrint("lock", "Locking: %s\n", locklocation.ToString().c_str()); + LogPrint("lock", "Locking: %s\n", locklocation.ToString()); dd_mutex.lock(); (*lockstack).push_back(std::make_pair(c, locklocation)); @@ -111,7 +111,7 @@ static void pop_lock() if (fDebug) { const CLockLocation& locklocation = (*lockstack).rbegin()->second; - LogPrint("lock", "Unlocked: %s\n", locklocation.ToString().c_str()); + LogPrint("lock", "Unlocked: %s\n", locklocation.ToString()); } dd_mutex.lock(); (*lockstack).pop_back(); @@ -140,7 +140,7 @@ void AssertLockHeldInternal(const char *pszName, const char* pszFile, int nLine, { BOOST_FOREACH(const PAIRTYPE(void*, CLockLocation)&i, *lockstack) if (i.first == cs) return; - LogPrintf("Lock %s not held in %s:%i; locks held:\n%s", pszName, pszFile, nLine, LocksHeld().c_str()); + LogPrintf("Lock %s not held in %s:%i; locks held:\n%s", pszName, pszFile, nLine, LocksHeld()); assert(0); } |