aboutsummaryrefslogtreecommitdiff
path: root/lib/jobs/generated/list_public_rooms.cpp
diff options
context:
space:
mode:
authorKitsune Ral <Kitsune-Ral@users.sf.net>2018-04-30 22:17:04 +0900
committerKitsune Ral <Kitsune-Ral@users.sf.net>2018-04-30 22:17:04 +0900
commitcbb7c2d7eff7ac8724d766ade2c3e659d15d97e2 (patch)
treeac67a1df20349b688077a716e2e13b1e44613a9c /lib/jobs/generated/list_public_rooms.cpp
parent228d379967ca0627564e1db5669029792f72bf06 (diff)
downloadlibquotient-cbb7c2d7eff7ac8724d766ade2c3e659d15d97e2.tar.gz
libquotient-cbb7c2d7eff7ac8724d766ade2c3e659d15d97e2.zip
jobs/generated: cleanup C++
Diffstat (limited to 'lib/jobs/generated/list_public_rooms.cpp')
-rw-r--r--lib/jobs/generated/list_public_rooms.cpp50
1 files changed, 25 insertions, 25 deletions
diff --git a/lib/jobs/generated/list_public_rooms.cpp b/lib/jobs/generated/list_public_rooms.cpp
index 2ae7f5d3..35a670fb 100644
--- a/lib/jobs/generated/list_public_rooms.cpp
+++ b/lib/jobs/generated/list_public_rooms.cpp
@@ -73,28 +73,28 @@ namespace QMatrixClient
template <> struct FromJson<GetPublicRoomsJob::PublicRoomsChunk>
{
- GetPublicRoomsJob::PublicRoomsChunk operator()(QJsonValue jv)
+ GetPublicRoomsJob::PublicRoomsChunk operator()(const QJsonValue& jv)
{
- QJsonObject o = jv.toObject();
+ const auto& o = jv.toObject();
GetPublicRoomsJob::PublicRoomsChunk result;
result.aliases =
- fromJson<QVector<QString>>(o.value("aliases"));
+ fromJson<QVector<QString>>(o.value("aliases"));
result.canonicalAlias =
- fromJson<QString>(o.value("canonical_alias"));
+ fromJson<QString>(o.value("canonical_alias"));
result.name =
- fromJson<QString>(o.value("name"));
+ fromJson<QString>(o.value("name"));
result.numJoinedMembers =
- fromJson<double>(o.value("num_joined_members"));
+ fromJson<double>(o.value("num_joined_members"));
result.roomId =
- fromJson<QString>(o.value("room_id"));
+ fromJson<QString>(o.value("room_id"));
result.topic =
- fromJson<QString>(o.value("topic"));
+ fromJson<QString>(o.value("topic"));
result.worldReadable =
- fromJson<bool>(o.value("world_readable"));
+ fromJson<bool>(o.value("world_readable"));
result.guestCanJoin =
- fromJson<bool>(o.value("guest_can_join"));
+ fromJson<bool>(o.value("guest_can_join"));
result.avatarUrl =
- fromJson<QString>(o.value("avatar_url"));
+ fromJson<QString>(o.value("avatar_url"));
return result;
}
@@ -184,12 +184,12 @@ namespace QMatrixClient
template <> struct FromJson<QueryPublicRoomsJob::Filter>
{
- QueryPublicRoomsJob::Filter operator()(QJsonValue jv)
+ QueryPublicRoomsJob::Filter operator()(const QJsonValue& jv)
{
- QJsonObject o = jv.toObject();
+ const auto& o = jv.toObject();
QueryPublicRoomsJob::Filter result;
result.genericSearchTerm =
- fromJson<QString>(o.value("generic_search_term"));
+ fromJson<QString>(o.value("generic_search_term"));
return result;
}
@@ -216,28 +216,28 @@ namespace QMatrixClient
template <> struct FromJson<QueryPublicRoomsJob::PublicRoomsChunk>
{
- QueryPublicRoomsJob::PublicRoomsChunk operator()(QJsonValue jv)
+ QueryPublicRoomsJob::PublicRoomsChunk operator()(const QJsonValue& jv)
{
- QJsonObject o = jv.toObject();
+ const auto& o = jv.toObject();
QueryPublicRoomsJob::PublicRoomsChunk result;
result.aliases =
- fromJson<QVector<QString>>(o.value("aliases"));
+ fromJson<QVector<QString>>(o.value("aliases"));
result.canonicalAlias =
- fromJson<QString>(o.value("canonical_alias"));
+ fromJson<QString>(o.value("canonical_alias"));
result.name =
- fromJson<QString>(o.value("name"));
+ fromJson<QString>(o.value("name"));
result.numJoinedMembers =
- fromJson<double>(o.value("num_joined_members"));
+ fromJson<double>(o.value("num_joined_members"));
result.roomId =
- fromJson<QString>(o.value("room_id"));
+ fromJson<QString>(o.value("room_id"));
result.topic =
- fromJson<QString>(o.value("topic"));
+ fromJson<QString>(o.value("topic"));
result.worldReadable =
- fromJson<bool>(o.value("world_readable"));
+ fromJson<bool>(o.value("world_readable"));
result.guestCanJoin =
- fromJson<bool>(o.value("guest_can_join"));
+ fromJson<bool>(o.value("guest_can_join"));
result.avatarUrl =
- fromJson<QString>(o.value("avatar_url"));
+ fromJson<QString>(o.value("avatar_url"));
return result;
}