From 7ef14023ab337972530bb3f4ad35f8daa326233b Mon Sep 17 00:00:00 2001 From: Kitsune Ral Date: Mon, 2 Apr 2018 14:40:05 +0900 Subject: Fixes according to results of static analysis Many thanks to clang-tidy and clazy authors for the tools, and to Qt Creator developers for making them easily available in the IDE. --- lib/events/roommessageevent.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'lib/events') diff --git a/lib/events/roommessageevent.cpp b/lib/events/roommessageevent.cpp index dec0ca50..1a4e74bf 100644 --- a/lib/events/roommessageevent.cpp +++ b/lib/events/roommessageevent.cpp @@ -87,7 +87,7 @@ RoomMessageEvent::RoomMessageEvent(const QJsonObject& obj) _plainBody = content["body"].toString(); _msgtype = content["msgtype"].toString(); - for (auto mt: msgTypes) + for (const auto& mt: msgTypes) if (mt.jsonType == _msgtype) _content.reset(mt.maker(content)); -- cgit v1.2.3