diff options
author | Alexey Rusakov <Kitsune-Ral@users.sf.net> | 2021-12-22 13:44:39 +0100 |
---|---|---|
committer | Alexey Rusakov <Kitsune-Ral@users.sf.net> | 2021-12-22 13:44:39 +0100 |
commit | 231c4d723eb53f3ea5f641b743d198584840a963 (patch) | |
tree | e7ea66c240f32b1666d2a765e00bebfa36e3927d /lib/identity | |
parent | b989383165b648269a231d1febadc8150676d5cf (diff) | |
download | libquotient-231c4d723eb53f3ea5f641b743d198584840a963.tar.gz libquotient-231c4d723eb53f3ea5f641b743d198584840a963.zip |
Simplify the code around EventFactory<>
The former code assumed that EventFactory<> is just a class-level shell
for a bunch of functions and a static data member that only exists to
allow specialisations to occur for the whole group together. On top of
that, setupFactory() and registerEventType() strived to protect this
group from double registration coming from static variables in an
anonymous namespace produced by REGISTER_EVENT_TYPE.
The whole thing is now de-static-ed: resolving the factory now relies
on class-static Event/RoomEvent/StateEventBase::factory variables
instead of factory_t type aliases; and REGISTER_EVENT_TYPE produces
non-static inline variables instead, obviating the need of
registerEventType/setupFactory kludge.
Diffstat (limited to 'lib/identity')
0 files changed, 0 insertions, 0 deletions