From 6cf5244bc514042fe419fffe1cd26a7f5e3c778f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Roman=20Smr=C5=BE?= Date: Thu, 16 Apr 2020 21:42:45 +0200 Subject: Remove optional from load result Makes loading of data well-defined for arbitrary object contents. Introduce zero reference and object to represent missing or mismatched parts. --- src/channel.h | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'src/channel.h') diff --git a/src/channel.h b/src/channel.h index 100003c..1c7df30 100644 --- a/src/channel.h +++ b/src/channel.h @@ -9,7 +9,7 @@ namespace erebos { struct ChannelRequestData { Ref store(const Storage & st) const; - static optional load(const Ref &); + static ChannelRequestData load(const Ref &); const vector>> peers; const Stored key; @@ -20,7 +20,7 @@ typedef Signed ChannelRequest; struct ChannelAcceptData { Ref store(const Storage & st) const; - static optional load(const Ref &); + static ChannelAcceptData load(const Ref &); Stored channel() const; @@ -40,7 +40,7 @@ public: {} Ref store(const Storage & st) const; - static optional load(const Ref &); + static Channel load(const Ref &); static Stored generateRequest(const Storage &, const Identity & self, const Identity & peer); -- cgit v1.2.3