aboutsummaryrefslogtreecommitdiff
path: root/lib/room.h
diff options
context:
space:
mode:
authorAlexey Rusakov <Kitsune-Ral@users.sf.net>2021-11-18 17:33:05 +0100
committerAlexey Rusakov <Kitsune-Ral@users.sf.net>2021-11-18 18:03:06 +0100
commit76b6238af16a1ccd284831ce42ec9e2cb1fba2c5 (patch)
tree0a4c7b0fda14df67da49f866dfcdc3aa949dfbe0 /lib/room.h
parentbcf7f7e6408872d8315e5c69829d7ce790e4820a (diff)
downloadlibquotient-76b6238af16a1ccd284831ce42ec9e2cb1fba2c5.tar.gz
libquotient-76b6238af16a1ccd284831ce42ec9e2cb1fba2c5.zip
Make Room::Changes an enum class; simplify enumerators
This enumeration sees very limited (if any) use outside Quotient; and though this change will surely break code using it the fix is very straightforward and quick.
Diffstat (limited to 'lib/room.h')
-rw-r--r--lib/room.h39
1 files changed, 20 insertions, 19 deletions
diff --git a/lib/room.h b/lib/room.h
index d94de51c..8a544e82 100644
--- a/lib/room.h
+++ b/lib/room.h
@@ -157,26 +157,27 @@ public:
using rev_iter_t = Timeline::const_reverse_iterator;
using timeline_iter_t = Timeline::const_iterator;
- enum Change : uint {
- NoChange = 0x0,
- NameChange = 0x1,
- AliasesChange = 0x2,
- CanonicalAliasChange = AliasesChange,
- TopicChange = 0x4,
- UnreadNotifsChange = 0x8,
- AvatarChange = 0x10,
- JoinStateChange = 0x20,
- TagsChange = 0x40,
- MembersChange = 0x80,
+ enum class Change : uint {
+ None = 0x0,
+ Name = 0x1,
+ Aliases = 0x2,
+ CanonicalAlias = Aliases,
+ Topic = 0x4,
+ UnreadNotifs = 0x8,
+ Avatar = 0x10,
+ JoinState = 0x20,
+ Tags = 0x40,
+ Members = 0x80,
/* = 0x100, */
- AccountDataChange Q_DECL_ENUMERATOR_DEPRECATED_X(
- "AccountDataChange will be merged into OtherChange in 0.8") = 0x200,
- SummaryChange = 0x400,
- ReadMarkerChange Q_DECL_ENUMERATOR_DEPRECATED_X(
- "ReadMarkerChange will be merged into OtherChange in 0.8") = 0x800,
- OtherChange = 0x8000,
- OtherChanges = OtherChange,
- AnyChange = 0xFFFF
+ AccountData Q_DECL_ENUMERATOR_DEPRECATED_X(
+ "Change::AccountData will be merged into Change::Other in 0.8") =
+ 0x200,
+ Summary = 0x400,
+ ReadMarker Q_DECL_ENUMERATOR_DEPRECATED_X(
+ "Change::ReadMarker will be merged into Change::Other in 0.8") =
+ 0x800,
+ Other = 0x8000,
+ Any = 0xFFFF
};
QUO_DECLARE_FLAGS(Changes, Change)