aboutsummaryrefslogtreecommitdiff
path: root/lib/events/event.h
diff options
context:
space:
mode:
authorKitsune Ral <Kitsune-Ral@users.sf.net>2020-11-15 21:51:51 +0100
committerKitsune Ral <Kitsune-Ral@users.sf.net>2020-11-15 21:51:51 +0100
commit52cab4b11bdd48cd87e04c01b12c698ec4145e6d (patch)
treef8b44dd9c585606b4ac229c396ef914d5950fd47 /lib/events/event.h
parent5b1bfc102fccd4e57893b34bf2b0a14ba6a9f577 (diff)
downloadlibquotient-52cab4b11bdd48cd87e04c01b12c698ec4145e6d.tar.gz
libquotient-52cab4b11bdd48cd87e04c01b12c698ec4145e6d.zip
Cleanup across event classes
In particular: removed unnecessary #includes, deprecated and no more used constructs, replaced stored members with dynamic generation from JSON (TypingEvent and, especially promising for performance, ReceiptEvent)
Diffstat (limited to 'lib/events/event.h')
-rw-r--r--lib/events/event.h12
1 files changed, 0 insertions, 12 deletions
diff --git a/lib/events/event.h b/lib/events/event.h
index b12dc9ad..626a0229 100644
--- a/lib/events/event.h
+++ b/lib/events/event.h
@@ -21,10 +21,6 @@
#include "converters.h"
#include "logging.h"
-#ifdef ENABLE_EVENTTYPE_ALIAS
-# define USE_EVENTTYPE_ALIAS 1
-#endif
-
namespace Quotient {
// === event_ptr_tt<> and type casting facilities ===
@@ -45,14 +41,6 @@ inline TargetEventT* weakPtrCast(const event_ptr_tt<EventT>& ptr)
return static_cast<TargetEventT*>(rawPtr(ptr));
}
-/// Re-wrap a smart pointer to base into a smart pointer to derived
-template <typename TargetT, typename SourceT>
-[[deprecated("Consider using eventCast() or visit() instead")]]
-inline event_ptr_tt<TargetT> ptrCast(event_ptr_tt<SourceT>&& ptr)
-{
- return std::unique_ptr<TargetT>(static_cast<TargetT*>(ptr.release()));
-}
-
// === Standard Matrix key names and basicEventJson() ===
static const auto TypeKey = QStringLiteral("type");