From 3357cbc91e7ff4d0d455c88785fc455067b34820 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Roman=20Smr=C5=BE?= Date: Sat, 14 Mar 2020 21:14:52 +0100 Subject: Storage: filter ancestors and overwritable Ref and Stored Simple but slow implementation of the filtering for now. --- src/identity.cpp | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'src/identity.cpp') diff --git a/src/identity.cpp b/src/identity.cpp index 61059ab..8f606ae 100644 --- a/src/identity.cpp +++ b/src/identity.cpp @@ -61,7 +61,7 @@ Stored Identity::keyMessage() const optional Identity::ref() const { if (p->data.size() == 1) - return p->data[0].ref; + return p->data[0].ref(); return nullopt; } @@ -77,7 +77,7 @@ Identity::Builder Identity::create(const Storage & st) Identity::Builder Identity::modify() const { return Builder (new Builder::Priv { - .storage = p->data[0].ref.storage(), + .storage = p->data[0].ref().storage(), .prev = p->data, .keyIdentity = p->data[0]->data->keyIdentity, .keyMessage = p->data[0]->data->keyMessage, @@ -146,14 +146,14 @@ Ref IdentityData::store(const Storage & st) const vector items; for (const auto p : prev) - items.emplace_back("SPREV", p.ref); + items.emplace_back("SPREV", p.ref()); if (name) items.emplace_back("name", *name); if (owner) - items.emplace_back("owner", owner->ref); - items.emplace_back("key-id", keyIdentity.ref); + items.emplace_back("owner", owner->ref()); + items.emplace_back("key-id", keyIdentity.ref()); if (keyMessage) - items.emplace_back("key-msg", keyMessage->ref); + items.emplace_back("key-msg", keyMessage->ref()); return st.storeObject(Record(std::move(items))); } -- cgit v1.2.3