mirror of
https://github.com/XRPLF/rippled.git
synced 2025-12-06 17:27:55 +00:00
Replace strUnHex pair return type with optional<Blob>
This commit is contained in:
@@ -477,12 +477,15 @@ static boost::optional<detail::STVar> parseLeaf (
|
||||
|
||||
try
|
||||
{
|
||||
auto [vBlob, validVBlob] = strUnHex (value.asString ());
|
||||
|
||||
if (! validVBlob)
|
||||
if (auto vBlob = strUnHex(value.asString()))
|
||||
{
|
||||
ret = detail::make_stvar<STBlob>(
|
||||
field, vBlob->data(), vBlob->size());
|
||||
}
|
||||
else
|
||||
{
|
||||
Throw<std::invalid_argument> ("invalid data");
|
||||
|
||||
ret = detail::make_stvar<STBlob>(field, vBlob.data(), vBlob.size());
|
||||
}
|
||||
}
|
||||
catch (std::exception const&)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user