From ed467d27b07781fdd2f7ddef043568954ce50b69 Mon Sep 17 00:00:00 2001 From: Kitsune Ral Date: Mon, 2 Jul 2018 13:39:33 +0900 Subject: 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... --- lib/events/accountdataevents.h | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'lib/events/accountdataevents.h') 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(contentJson()[#_ContentKey]); } \ - }; // End of macro + { return fromJson(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) -- cgit v1.2.3