diff --git a/lib/events/roommessageevent.cpp b/lib/events/roommessageevent.cpp index f0217e080..a5b27ba0d 100644 --- a/lib/events/roommessageevent.cpp +++ b/lib/events/roommessageevent.cpp @@ -49,7 +49,7 @@ struct MsgTypeDesc { TypedBase* (*maker)(const QJsonObject&); }; -const std::vector msgTypes = { +constexpr auto msgTypes = std::to_array({ { TextTypeKey, MsgType::Text, make }, { EmoteTypeKey, MsgType::Emote, make }, { NoticeTypeKey, MsgType::Notice, make }, @@ -58,7 +58,7 @@ const std::vector msgTypes = { { "m.location"_ls, MsgType::Location, make }, { "m.video"_ls, MsgType::Video, make }, { "m.audio"_ls, MsgType::Audio, make } -}; +}); QString msgTypeToJson(MsgType enumType) {