mirror of
https://github.com/Xahau/xahaud.git
synced 2026-07-25 16:10:15 +00:00
Use structured bindings in some places:
Most of the new uses either: * Replace some uses of `tie` * bind to pairs when iterating through maps
This commit is contained in:
@@ -477,13 +477,12 @@ static boost::optional<detail::STVar> parseLeaf (
|
||||
|
||||
try
|
||||
{
|
||||
std::pair<Blob, bool> vBlob (strUnHex (value.asString ()));
|
||||
auto [vBlob, validVBlob] = strUnHex (value.asString ());
|
||||
|
||||
if (! vBlob.second)
|
||||
if (! validVBlob)
|
||||
Throw<std::invalid_argument> ("invalid data");
|
||||
|
||||
ret = detail::make_stvar <STBlob> (field, vBlob.first.data (),
|
||||
vBlob.first.size ());
|
||||
ret = detail::make_stvar<STBlob>(field, vBlob.data(), vBlob.size());
|
||||
}
|
||||
catch (std::exception const&)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user