mirror of
https://github.com/bitcoin/bitcoin.git
synced 2025-02-21 14:34:49 +01:00
refactor: remove unnecessary string initializations
This commit is contained in:
parent
a65f6d8cbb
commit
4ddd746bf9
5 changed files with 5 additions and 5 deletions
|
@ -148,7 +148,7 @@ bool GCSFilter::MatchAny(const ElementSet& elements) const
|
|||
|
||||
const std::string& BlockFilterTypeName(BlockFilterType filter_type)
|
||||
{
|
||||
static std::string unknown_retval = "";
|
||||
static std::string unknown_retval;
|
||||
auto it = g_filter_types.find(filter_type);
|
||||
return it != g_filter_types.end() ? it->second : unknown_retval;
|
||||
}
|
||||
|
|
|
@ -49,7 +49,7 @@ bool ExternalSigner::Enumerate(const std::string& command, std::vector<ExternalS
|
|||
if (signer.m_fingerprint.compare(fingerprintStr) == 0) duplicate = true;
|
||||
}
|
||||
if (duplicate) break;
|
||||
std::string name = "";
|
||||
std::string name;
|
||||
const UniValue& model_field = find_value(signer, "model");
|
||||
if (model_field.isStr() && model_field.getValStr() != "") {
|
||||
name += model_field.getValStr();
|
||||
|
|
|
@ -740,7 +740,7 @@ std::string ArgsManager::GetHelpMessage() const
|
|||
{
|
||||
const bool show_debug = GetBoolArg("-help-debug", false);
|
||||
|
||||
std::string usage = "";
|
||||
std::string usage;
|
||||
LOCK(cs_args);
|
||||
for (const auto& arg_map : m_available_args) {
|
||||
switch(arg_map.first) {
|
||||
|
|
|
@ -140,7 +140,7 @@ RPCHelpMan importprivkey()
|
|||
EnsureWalletIsUnlocked(*pwallet);
|
||||
|
||||
std::string strSecret = request.params[0].get_str();
|
||||
std::string strLabel = "";
|
||||
std::string strLabel;
|
||||
if (!request.params[1].isNull())
|
||||
strLabel = request.params[1].get_str();
|
||||
|
||||
|
|
|
@ -241,7 +241,7 @@ static RPCHelpMan loadwallet()
|
|||
|
||||
static RPCHelpMan setwalletflag()
|
||||
{
|
||||
std::string flags = "";
|
||||
std::string flags;
|
||||
for (auto& it : WALLET_FLAG_MAP)
|
||||
if (it.second & MUTABLE_WALLET_FLAGS)
|
||||
flags += (flags == "" ? "" : ", ") + it.first;
|
||||
|
|
Loading…
Add table
Reference in a new issue