diff options
author | Kitsune Ral <Kitsune-Ral@users.sf.net> | 2019-04-04 21:27:38 +0900 |
---|---|---|
committer | Kitsune Ral <Kitsune-Ral@users.sf.net> | 2019-04-06 20:32:48 +0900 |
commit | 432e7fd7107d8260e0016a1adcd8d94263dc1044 (patch) | |
tree | 71171a541e508f7a97b1d843c707c7ef296374cb /lib/events | |
parent | 8035ec464ce797abab5e464c2cfb485f7fa14d06 (diff) | |
download | libquotient-432e7fd7107d8260e0016a1adcd8d94263dc1044.tar.gz libquotient-432e7fd7107d8260e0016a1adcd8d94263dc1044.zip |
Clean up on clang-tidy/clazy analysis
Diffstat (limited to 'lib/events')
-rw-r--r-- | lib/events/event.cpp | 3 | ||||
-rw-r--r-- | lib/events/stateevent.cpp | 2 |
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)) |