diff options
author | Kitsune Ral <Kitsune-Ral@users.sf.net> | 2018-07-02 13:39:33 +0900 |
---|---|---|
committer | Kitsune Ral <Kitsune-Ral@users.sf.net> | 2018-07-04 20:12:34 +0900 |
commit | ed467d27b07781fdd2f7ddef043568954ce50b69 (patch) | |
tree | a0782b0d87de8cbd851c6a008764dd6ae07836db /lib/events/accountdataevents.h | |
parent | bd853f392aaf5b05e0a8023da85a38e91d90a6e0 (diff) | |
download | libquotient-ed467d27b07781fdd2f7ddef043568954ce50b69.tar.gz libquotient-ed467d27b07781fdd2f7ddef043568954ce50b69.zip |
Events: use a template structure instead of template variables; rearrange code into blocks
A template member variable in it seemed to cause internal compiler error in MSVC 2017, let alone MSVC 2015...
Diffstat (limited to 'lib/events/accountdataevents.h')
-rw-r--r-- | lib/events/accountdataevents.h | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/lib/events/accountdataevents.h b/lib/events/accountdataevents.h index 6d53d2aa..ed4373cd 100644 --- a/lib/events/accountdataevents.h +++ b/lib/events/accountdataevents.h @@ -65,8 +65,10 @@ namespace QMatrixClient toJson(std::move(content)) } }) \ { } \ auto _ContentKey() const \ - { return fromJson<content_type>(contentJson()[#_ContentKey]); } \ - }; // End of macro + { return fromJson<content_type>(contentJson()[#_ContentKey##_ls]); } \ + }; \ + REGISTER_EVENT_TYPE(_Name) \ + // End of macro DEFINE_SIMPLE_EVENT(TagEvent, "m.tag", TagsMap, tags) DEFINE_SIMPLE_EVENT(ReadMarkerEvent, "m.fully_read", QString, event_id) |