diff options
author | Kitsune Ral <Kitsune-Ral@users.sf.net> | 2018-07-02 13:19:41 +0900 |
---|---|---|
committer | Kitsune Ral <Kitsune-Ral@users.sf.net> | 2018-07-04 09:07:32 +0900 |
commit | bd853f392aaf5b05e0a8023da85a38e91d90a6e0 (patch) | |
tree | 1a89457af426e771531a9002ccf61603f0b87dc2 /lib | |
parent | f1ffe1e7a3e81c07a07a8416ce307e4413ec8fbc (diff) | |
download | libquotient-bd853f392aaf5b05e0a8023da85a38e91d90a6e0.tar.gz libquotient-bd853f392aaf5b05e0a8023da85a38e91d90a6e0.zip |
TimelineItem::operator*()
Diffstat (limited to 'lib')
-rw-r--r-- | lib/room.h | 6 |
1 files changed, 5 insertions, 1 deletions
@@ -48,12 +48,16 @@ namespace QMatrixClient using index_t = int; TimelineItem(RoomEventPtr&& e, index_t number) - : evt(std::move(e)), idx(number) { } + : evt(std::move(e)), idx(number) + { + Q_ASSERT(evt); + } const RoomEvent* event() const { return rawPtr(evt); } template <typename EventT> const EventT* viewAs() const { return weakPtrCast<const EventT>(evt); } const RoomEventPtr& operator->() const { return evt; } + const RoomEvent& operator*() const { return *evt; } index_t index() const { return idx; } // Used for event redaction |