aboutsummaryrefslogtreecommitdiff
path: root/lib/events
diff options
context:
space:
mode:
Diffstat (limited to 'lib/events')
-rw-r--r--lib/events/accountdataevents.h5
-rw-r--r--lib/events/simplestateevents.h12
2 files changed, 4 insertions, 13 deletions
diff --git a/lib/events/accountdataevents.h b/lib/events/accountdataevents.h
index e5101d20..9cf77be3 100644
--- a/lib/events/accountdataevents.h
+++ b/lib/events/accountdataevents.h
@@ -4,7 +4,6 @@
#pragma once
#include "event.h"
-#include "eventcontent.h"
namespace Quotient {
constexpr const char* FavouriteTag = "m.favourite";
@@ -16,12 +15,12 @@ struct TagRecord {
order_type order;
- TagRecord(order_type order = none) : order(std::move(order)) {}
+ TagRecord(order_type order = none) : order(order) {}
bool operator<(const TagRecord& other) const
{
// Per The Spec, rooms with no order should be after those with order,
- // against optional<>::operator<() convention.
+ // against std::optional<>::operator<() convention.
return order && (!other.order || *order < *other.order);
}
};
diff --git a/lib/events/simplestateevents.h b/lib/events/simplestateevents.h
index cf1bfbba..9ce78609 100644
--- a/lib/events/simplestateevents.h
+++ b/lib/events/simplestateevents.h
@@ -8,8 +8,7 @@
namespace Quotient {
namespace EventContent {
template <typename T>
- class SimpleContent {
- public:
+ struct SimpleContent {
using value_type = T;
// The constructor is templated to enable perfect forwarding
@@ -25,11 +24,8 @@ namespace EventContent {
return { { key, Quotient::toJson(value) } };
}
- public:
T value;
-
- protected:
- QString key;
+ const QString key;
};
} // namespace EventContent
@@ -65,10 +61,6 @@ public:
explicit RoomAliasesEvent(const QJsonObject& obj)
: StateEvent(typeId(), obj, QStringLiteral("aliases"))
{}
- RoomAliasesEvent(const QString& server, const QStringList& aliases)
- : StateEvent(typeId(), matrixTypeId(), server,
- QStringLiteral("aliases"), aliases)
- {}
QString server() const { return stateKey(); }
QStringList aliases() const { return content().value; }
};