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/message.h | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'src/message.h') diff --git a/src/message.h b/src/message.h index 7e0f597..c4a3549 100644 --- a/src/message.h +++ b/src/message.h @@ -19,13 +19,13 @@ namespace erebos { struct DirectMessageData { - static optional load(const Ref &); + static DirectMessageData load(const Ref &); Ref store(const Storage &) const; vector> prev; - Identity from; - ZonedTime time; - string text; + optional from; + optional time; + optional text; }; struct DirectMessage::Priv -- cgit v1.2.3