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
|
|
@ -770,8 +770,8 @@ static void TestSHA3_256(const std::string& input, const std::string& output)
|
|||
int s1 = InsecureRandRange(in_bytes.size() + 1);
|
||||
int s2 = InsecureRandRange(in_bytes.size() + 1 - s1);
|
||||
int s3 = in_bytes.size() - s1 - s2;
|
||||
sha.Write(MakeSpan(in_bytes).first(s1)).Write(MakeSpan(in_bytes).subspan(s1, s2));
|
||||
sha.Write(MakeSpan(in_bytes).last(s3)).Finalize(out);
|
||||
sha.Write(Span{in_bytes}.first(s1)).Write(Span{in_bytes}.subspan(s1, s2));
|
||||
sha.Write(Span{in_bytes}.last(s3)).Finalize(out);
|
||||
BOOST_CHECK(std::equal(std::begin(out_bytes), std::end(out_bytes), out));
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue