mirror of
https://github.com/bitcoin/bitcoin.git
synced 2025-11-13 07:28:59 +01:00
Merge bitcoin/bitcoin#25707: refactor: Make const references to avoid unnecessarily copying objects and enable two clang-tidy checks
ae7ae36d31tidy: Enable two clang-tidy checks (Aurèle Oulès)081b0e53e3refactor: Make const refs vars where applicable (Aurèle Oulès) Pull request description: I added const references to some variables to avoid unnecessarily copying objects. Also added two clang-tidy checks : [performance-for-range-copy](https://releases.llvm.org/11.1.0/tools/clang/tools/extra/docs/clang-tidy/checks/performance-for-range-copy.html) and [performance-unnecessary-copy-initialization](https://releases.llvm.org/12.0.0/tools/clang/tools/extra/docs/clang-tidy/checks/performance-unnecessary-copy-initialization.html). ACKs for top commit: vasild: ACKae7ae36d31MarcoFalke: review ACKae7ae36d31Tree-SHA512: f6ac6b0cd0eee1e0c34d2f186484bc0f7ec6071451cccb33fa88a67d93d92b304e2fac378b88f087e94657745bca4e966dbc443759587400eb01b1f3061fde8c
This commit is contained in:
@@ -3474,7 +3474,7 @@ void CWallet::SetupDescriptorScriptPubKeyMans()
|
||||
const UniValue& descriptor_vals = find_value(signer_res, internal ? "internal" : "receive");
|
||||
if (!descriptor_vals.isArray()) throw std::runtime_error(std::string(__func__) + ": Unexpected result");
|
||||
for (const UniValue& desc_val : descriptor_vals.get_array().getValues()) {
|
||||
std::string desc_str = desc_val.getValStr();
|
||||
const std::string& desc_str = desc_val.getValStr();
|
||||
FlatSigningProvider keys;
|
||||
std::string desc_error;
|
||||
std::unique_ptr<Descriptor> desc = Parse(desc_str, keys, desc_error, false);
|
||||
|
||||
Reference in New Issue
Block a user