diff options
author | Roman Smrž <roman.smrz@seznam.cz> | 2023-06-17 21:58:32 +0200 |
---|---|---|
committer | Roman Smrž <roman.smrz@seznam.cz> | 2023-06-18 22:41:23 +0200 |
commit | e7d6aafd3c9353d9e6169ca775cf1dae618238cd (patch) | |
tree | 6df8f296d7db8dd9e7d23f5774009ccc5ee269a7 /src/pubkey.h | |
parent | 2130d07cbf91e016fd21a730a8449dd4bd34a093 (diff) |
Storage: iterable type for record item list
Diffstat (limited to 'src/pubkey.h')
-rw-r--r-- | src/pubkey.h | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/src/pubkey.h b/src/pubkey.h index 5cb693b..ca662ba 100644 --- a/src/pubkey.h +++ b/src/pubkey.h @@ -110,10 +110,9 @@ Signed<T> Signed<T>::load(const Ref & ref) if (auto rec = ref->asRecord()) if (auto data = rec->item("SDATA").as<T>()) { vector<Stored<Signature>> sigs; - for (auto item : rec->items("sig")) - if (auto sig = item.as<Signature>()) - if (sig.value()->verify(data.value().ref())) - sigs.push_back(sig.value()); + for (const auto & sig : rec->items("sig").as<Signature>()) + if (sig->verify(data.value().ref())) + sigs.push_back(sig); return Signed(*data, sigs); } |