aboutsummaryrefslogtreecommitdiff
path: root/src/wallet
diff options
context:
space:
mode:
authorfanquake <fanquake@gmail.com>2022-07-25 11:46:57 +0100
committerfanquake <fanquake@gmail.com>2022-07-26 10:16:42 +0100
commit4ddd746bf9714a209b2f82918a70c4fe81d895c9 (patch)
tree924a9164d8808c49f03237ec367e4dd4852cc5a4 /src/wallet
parenta65f6d8cbbb368ddbe8624f8f0d395bb146b5e6d (diff)
downloadbitcoin-4ddd746bf9714a209b2f82918a70c4fe81d895c9.tar.xz
refactor: remove unnecessary string initializations
Diffstat (limited to 'src/wallet')
-rw-r--r--src/wallet/rpc/backup.cpp2
-rw-r--r--src/wallet/rpc/wallet.cpp2
2 files changed, 2 insertions, 2 deletions
diff --git a/src/wallet/rpc/backup.cpp b/src/wallet/rpc/backup.cpp
index 57c3bcc68b..306053fd0c 100644
--- a/src/wallet/rpc/backup.cpp
+++ b/src/wallet/rpc/backup.cpp
@@ -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();
diff --git a/src/wallet/rpc/wallet.cpp b/src/wallet/rpc/wallet.cpp
index b474236e58..0fe8871152 100644
--- a/src/wallet/rpc/wallet.cpp
+++ b/src/wallet/rpc/wallet.cpp
@@ -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;