From 4ddd746bf9714a209b2f82918a70c4fe81d895c9 Mon Sep 17 00:00:00 2001 From: fanquake Date: Mon, 25 Jul 2022 11:46:57 +0100 Subject: refactor: remove unnecessary string initializations --- src/wallet/rpc/backup.cpp | 2 +- src/wallet/rpc/wallet.cpp | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) (limited to 'src/wallet/rpc') 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; -- cgit v1.2.3