mirror of
https://github.com/ElementsProject/elements.git
synced 2026-08-14 12:43:40 +02:00
Replace MakeSpan helper with Span deduction guide
This commit is contained in:
parent
383d350bd5
commit
568dd2f839
16 changed files with 106 additions and 104 deletions
|
|
@ -631,7 +631,7 @@ public:
|
|||
out.origins.emplace(entry.first.GetID(), std::make_pair<CPubKey, KeyOriginInfo>(CPubKey(entry.first), std::move(entry.second)));
|
||||
}
|
||||
|
||||
output_scripts = MakeScripts(pubkeys, MakeSpan(subscripts), out);
|
||||
output_scripts = MakeScripts(pubkeys, Span{subscripts}, out);
|
||||
return true;
|
||||
}
|
||||
|
||||
|
|
@ -974,10 +974,10 @@ std::unique_ptr<PubkeyProvider> ParsePubkeyInner(uint32_t key_exp_index, const S
|
|||
}
|
||||
KeyPath path;
|
||||
DeriveType type = DeriveType::NO;
|
||||
if (split.back() == MakeSpan("*").first(1)) {
|
||||
if (split.back() == Span{"*"}.first(1)) {
|
||||
split.pop_back();
|
||||
type = DeriveType::UNHARDENED;
|
||||
} else if (split.back() == MakeSpan("*'").first(2) || split.back() == MakeSpan("*h").first(2)) {
|
||||
} else if (split.back() == Span{"*'"}.first(2) || split.back() == Span{"*h"}.first(2)) {
|
||||
split.pop_back();
|
||||
type = DeriveType::HARDENED;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue