summaryrefslogtreecommitdiff
path: root/src/identity.cpp
diff options
context:
space:
mode:
authorRoman Smrž <roman.smrz@seznam.cz>2023-06-17 21:58:32 +0200
committerRoman Smrž <roman.smrz@seznam.cz>2023-06-18 22:41:23 +0200
commite7d6aafd3c9353d9e6169ca775cf1dae618238cd (patch)
tree6df8f296d7db8dd9e7d23f5774009ccc5ee269a7 /src/identity.cpp
parent2130d07cbf91e016fd21a730a8449dd4bd34a093 (diff)
Storage: iterable type for record item list
Diffstat (limited to 'src/identity.cpp')
-rw-r--r--src/identity.cpp7
1 files changed, 1 insertions, 6 deletions
diff --git a/src/identity.cpp b/src/identity.cpp
index 9077db2..3b8d3bf 100644
--- a/src/identity.cpp
+++ b/src/identity.cpp
@@ -239,14 +239,9 @@ void Identity::Builder::owner(const Identity & val)
IdentityData IdentityData::load(const Ref & ref)
{
if (auto rec = ref->asRecord()) {
- vector<Stored<Signed<IdentityData>>> prev;
- for (auto p : rec->items("SPREV"))
- if (const auto & x = p.as<Signed<IdentityData>>())
- prev.push_back(x.value());
-
if (auto keyIdentity = rec->item("key-id").as<PublicKey>())
return IdentityData {
- .prev = std::move(prev),
+ .prev = rec->items("SPREV").as<Signed<IdentityData>>(),
.name = rec->item("name").asText(),
.owner = rec->item("owner").as<Signed<IdentityData>>(),
.keyIdentity = keyIdentity.value(),