aboutsummaryrefslogtreecommitdiff
path: root/src/script
diff options
context:
space:
mode:
authorWladimir J. van der Laan <laanwj@protonmail.com>2019-10-28 13:30:20 +0100
committerWladimir J. van der Laan <laanwj@protonmail.com>2019-10-28 13:31:33 +0100
commitc72906dcc11a73fa06a0adf97557fa756b551bee (patch)
tree2cfc335a4d7a75a0bbf20b8d49f04f987ec7266f /src/script
parenta25945318fdc2890a141a28843c2c5af251c9605 (diff)
downloadbitcoin-c72906dcc11a73fa06a0adf97557fa756b551bee.tar.xz
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/script')
-rw-r--r--src/script/descriptor.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/script/descriptor.cpp b/src/script/descriptor.cpp
index 536807e1d8..4b27ef0ca9 100644
--- a/src/script/descriptor.cpp
+++ b/src/script/descriptor.cpp
@@ -645,7 +645,7 @@ NODISCARD bool ParseKeyPath(const std::vector<Span<const char>>& split, KeyPath&
}
uint32_t p;
if (!ParseUInt32(std::string(elem.begin(), elem.end()), &p)) {
- error = strprintf("Key path value '%s' is not a valid uint32", std::string(elem.begin(), elem.end()).c_str());
+ error = strprintf("Key path value '%s' is not a valid uint32", std::string(elem.begin(), elem.end()));
return false;
} else if (p > 0x7FFFFFFFUL) {
error = strprintf("Key path value %u is out of range", p);
@@ -783,7 +783,7 @@ std::unique_ptr<DescriptorImpl> ParseScript(Span<const char>& sp, ParseScriptCon
uint32_t thres;
std::vector<std::unique_ptr<PubkeyProvider>> providers;
if (!ParseUInt32(std::string(threshold.begin(), threshold.end()), &thres)) {
- error = strprintf("Multi threshold '%s' is not valid", std::string(threshold.begin(), threshold.end()).c_str());
+ error = strprintf("Multi threshold '%s' is not valid", std::string(threshold.begin(), threshold.end()));
return nullptr;
}
size_t script_size = 0;