mirror of
https://github.com/ElementsProject/elements.git
synced 2026-08-14 12:43:40 +02:00
Simplify usage of Span in several places
This commit is contained in:
parent
ab303a16d1
commit
2676aeadfa
5 changed files with 18 additions and 18 deletions
|
|
@ -18,7 +18,7 @@ void test_one_input(const std::vector<uint8_t>& buffer)
|
|||
FuzzedDataProvider fuzzed_data_provider(buffer.data(), buffer.size());
|
||||
|
||||
std::string str = fuzzed_data_provider.ConsumeBytesAsString(32);
|
||||
const Span<const char> span = MakeSpan(str);
|
||||
const Span<const char> span{str};
|
||||
(void)span.data();
|
||||
(void)span.begin();
|
||||
(void)span.end();
|
||||
|
|
@ -32,7 +32,7 @@ void test_one_input(const std::vector<uint8_t>& buffer)
|
|||
}
|
||||
|
||||
std::string another_str = fuzzed_data_provider.ConsumeBytesAsString(32);
|
||||
const Span<const char> another_span = MakeSpan(another_str);
|
||||
const Span<const char> another_span{another_str};
|
||||
assert((span <= another_span) != (span > another_span));
|
||||
assert((span == another_span) != (span != another_span));
|
||||
assert((span >= another_span) != (span < another_span));
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue