summaryrefslogtreecommitdiff
path: root/include/erebos/state.h
diff options
context:
space:
mode:
authorRoman Smrž <roman.smrz@seznam.cz>2021-02-21 22:16:21 +0100
committerRoman Smrž <roman.smrz@seznam.cz>2021-02-23 22:12:41 +0100
commitc3d6046b25ef0786b8d2919dfa9db4eb05114501 (patch)
tree19af178d6305c3a83859b7d5b07dbc9b1af3aea5 /include/erebos/state.h
parent52db636c108ab0a16ba0ccf8df55cf28142a230c (diff)
Sync service
Diffstat (limited to 'include/erebos/state.h')
-rw-r--r--include/erebos/state.h5
1 files changed, 4 insertions, 1 deletions
diff --git a/include/erebos/state.h b/include/erebos/state.h
index 543e03c..b1567b0 100644
--- a/include/erebos/state.h
+++ b/include/erebos/state.h
@@ -29,6 +29,9 @@ public:
template<class T> LocalState shared(const Storage & st, const T & x)
{ return updateShared(T::sharedTypeId, x.store(st)); }
+ vector<Ref> sharedRefs() const;
+ LocalState sharedRefAdd(const Ref &) const;
+
private:
vector<Ref> lookupShared(UUID) const;
LocalState updateShared(UUID, const vector<Ref> &) const;
@@ -47,7 +50,7 @@ template<class T>
LocalState LocalState::shared(const vector<Stored<T>> & v) const
{
vector<Ref> refs;
- for (const auto x : v)
+ for (const auto & x : v)
refs.push_back(x.ref());
return updateShared(T::sharedTypeId, refs);
}