From e7d6aafd3c9353d9e6169ca775cf1dae618238cd Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Roman=20Smr=C5=BE?= Date: Sat, 17 Jun 2023 21:58:32 +0200 Subject: Storage: iterable type for record item list --- src/identity.cpp | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) (limited to 'src/identity.cpp') 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>> prev; - for (auto p : rec->items("SPREV")) - if (const auto & x = p.as>()) - prev.push_back(x.value()); - if (auto keyIdentity = rec->item("key-id").as()) return IdentityData { - .prev = std::move(prev), + .prev = rec->items("SPREV").as>(), .name = rec->item("name").asText(), .owner = rec->item("owner").as>(), .keyIdentity = keyIdentity.value(), -- cgit v1.2.3