diff options
author | Roman Smrž <roman.smrz@seznam.cz> | 2020-04-16 21:42:45 +0200 |
---|---|---|
committer | Roman Smrž <roman.smrz@seznam.cz> | 2020-04-16 21:42:45 +0200 |
commit | 6cf5244bc514042fe419fffe1cd26a7f5e3c778f (patch) | |
tree | 4a72abf80980c3d10656bd82606a69329867d057 /src/message.h | |
parent | a76a9ad65fa549d2c1650bb5a7d9a657186edc43 (diff) |
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.
Diffstat (limited to 'src/message.h')
-rw-r--r-- | src/message.h | 8 |
1 files changed, 4 insertions, 4 deletions
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<DirectMessageData> load(const Ref &); + static DirectMessageData load(const Ref &); Ref store(const Storage &) const; vector<Stored<DirectMessageData>> prev; - Identity from; - ZonedTime time; - string text; + optional<Identity> from; + optional<ZonedTime> time; + optional<string> text; }; struct DirectMessage::Priv |