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:
seelabs
2019-08-06 09:11:32 -07:00
parent 9c58f23cf8
commit 7912ee6f7b
66 changed files with 428 additions and 466 deletions

View File

@@ -428,9 +428,9 @@ isMemoOkay (STObject const& st, std::string& reason)
}
// The raw data is stored as hex-octets, which we want to decode.
auto data = strUnHex (memoElement.getText ());
auto [data, validData] = strUnHex (memoElement.getText ());
if (!data.second)
if (!validData)
{
reason = "The MemoType, MemoData and MemoFormat fields may "
"only contain hex-encoded data.";
@@ -459,7 +459,7 @@ isMemoOkay (STObject const& st, std::string& reason)
return a;
}();
for (auto c : data.first)
for (auto c : data)
{
if (!allowedSymbols[c])
{