aboutsummaryrefslogtreecommitdiff
path: root/lib/events
diff options
context:
space:
mode:
authorKitsune Ral <Kitsune-Ral@users.sf.net>2019-04-04 21:27:38 +0900
committerKitsune Ral <Kitsune-Ral@users.sf.net>2019-04-04 21:27:38 +0900
commit1c5696e8f5a9ef87a065e2496eecf178e41e75a7 (patch)
tree8b41686c2e599054666868479589ef0df3a375a2 /lib/events
parent7508887564935f70b086ed6fe79bd86757d1fc38 (diff)
downloadlibquotient-1c5696e8f5a9ef87a065e2496eecf178e41e75a7.tar.gz
libquotient-1c5696e8f5a9ef87a065e2496eecf178e41e75a7.zip
Clean up on clang-tidy/clazy analysis
Diffstat (limited to 'lib/events')
-rw-r--r--lib/events/event.cpp3
-rw-r--r--lib/events/stateevent.cpp2
2 files changed, 3 insertions, 2 deletions
diff --git a/lib/events/event.cpp b/lib/events/event.cpp
index c98dfbb6..6505d89a 100644
--- a/lib/events/event.cpp
+++ b/lib/events/event.cpp
@@ -38,7 +38,8 @@ event_type_t EventTypeRegistry::initializeTypeId(event_mtype_t matrixTypeId)
QString EventTypeRegistry::getMatrixType(event_type_t typeId)
{
- return typeId < get().eventTypes.size() ? get().eventTypes[typeId] : "";
+ return typeId < get().eventTypes.size()
+ ? get().eventTypes[typeId] : QString();
}
Event::Event(Type type, const QJsonObject& json)
diff --git a/lib/events/stateevent.cpp b/lib/events/stateevent.cpp
index e96614d2..a84f302b 100644
--- a/lib/events/stateevent.cpp
+++ b/lib/events/stateevent.cpp
@@ -27,7 +27,7 @@ using namespace QMatrixClient;
RoomEvent::factory_t::addMethod(
[] (const QJsonObject& json, const QString& matrixType) -> StateEventPtr
{
- if (!json.contains("state_key"))
+ if (!json.contains("state_key"_ls))
return nullptr;
if (auto e = StateEventBase::factory_t::make(json, matrixType))