summaryrefslogtreecommitdiff
path: root/src/pubkey.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/pubkey.h')
-rw-r--r--src/pubkey.h7
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);
}