mirror of
https://github.com/XRPLF/rippled.git
synced 2025-12-06 17:27:55 +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:
@@ -295,10 +295,11 @@ int SField::compare (SField const& f1, SField const& f2)
|
||||
SField const&
|
||||
SField::getField (std::string const& fieldName)
|
||||
{
|
||||
for (auto const & fieldPair : knownCodeToField)
|
||||
for (auto const& [_, f] : knownCodeToField)
|
||||
{
|
||||
if (fieldPair.second->fieldName == fieldName)
|
||||
return * (fieldPair.second);
|
||||
(void)_;
|
||||
if (f->fieldName == fieldName)
|
||||
return *f;
|
||||
}
|
||||
return sfInvalid;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user