diff options
author | Roman Smrž <roman.smrz@seznam.cz> | 2020-03-14 21:14:52 +0100 |
---|---|---|
committer | Roman Smrž <roman.smrz@seznam.cz> | 2020-03-14 21:14:52 +0100 |
commit | 3357cbc91e7ff4d0d455c88785fc455067b34820 (patch) | |
tree | c1a39e4e55c3bcc03461838b4d8220c3e5a30987 /src/identity.cpp | |
parent | 9076a13c78cf64a6afafe98817aed31feda568b1 (diff) |
Storage: filter ancestors and overwritable Ref and Stored
Simple but slow implementation of the filtering for now.
Diffstat (limited to 'src/identity.cpp')
-rw-r--r-- | src/identity.cpp | 12 |
1 files changed, 6 insertions, 6 deletions
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<PublicKey> Identity::keyMessage() const optional<Ref> 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<Record::Item> 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))); } |