diff options
author | Wladimir J. van der Laan <laanwj@protonmail.com> | 2019-10-28 13:30:20 +0100 |
---|---|---|
committer | Wladimir J. van der Laan <laanwj@protonmail.com> | 2019-10-28 13:31:33 +0100 |
commit | c72906dcc11a73fa06a0adf97557fa756b551bee (patch) | |
tree | 2cfc335a4d7a75a0bbf20b8d49f04f987ec7266f /src/sync.cpp | |
parent | a25945318fdc2890a141a28843c2c5af251c9605 (diff) |
refactor: Remove redundant c_str() calls in formatting
Our formatter, tinyformat, *never* needs `c_str()` for strings.
Remove redundant `c_str()` calls for:
- `strprintf`
- `LogPrintf`
- `tfm::format`
Diffstat (limited to 'src/sync.cpp')
-rw-r--r-- | src/sync.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/sync.cpp b/src/sync.cpp index 653800ae4e..257093fad1 100644 --- a/src/sync.cpp +++ b/src/sync.cpp @@ -173,7 +173,7 @@ void AssertLockHeldInternal(const char* pszName, const char* pszFile, int nLine, for (const std::pair<void*, CLockLocation>& i : g_lockstack) if (i.first == cs) return; - tfm::format(std::cerr, "Assertion failed: lock %s not held in %s:%i; locks held:\n%s", pszName, pszFile, nLine, LocksHeld().c_str()); + tfm::format(std::cerr, "Assertion failed: lock %s not held in %s:%i; locks held:\n%s", pszName, pszFile, nLine, LocksHeld()); abort(); } @@ -181,7 +181,7 @@ void AssertLockNotHeldInternal(const char* pszName, const char* pszFile, int nLi { for (const std::pair<void*, CLockLocation>& i : g_lockstack) { if (i.first == cs) { - tfm::format(std::cerr, "Assertion failed: lock %s held in %s:%i; locks held:\n%s", pszName, pszFile, nLine, LocksHeld().c_str()); + tfm::format(std::cerr, "Assertion failed: lock %s held in %s:%i; locks held:\n%s", pszName, pszFile, nLine, LocksHeld()); abort(); } } |