aboutsummaryrefslogtreecommitdiff
path: root/lib/jobs/generated/pusher.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/pusher.cpp
parent228d379967ca0627564e1db5669029792f72bf06 (diff)
downloadlibquotient-cbb7c2d7eff7ac8724d766ade2c3e659d15d97e2.tar.gz
libquotient-cbb7c2d7eff7ac8724d766ade2c3e659d15d97e2.zip
jobs/generated: cleanup C++
Diffstat (limited to 'lib/jobs/generated/pusher.cpp')
-rw-r--r--lib/jobs/generated/pusher.cpp32
1 files changed, 16 insertions, 16 deletions
diff --git a/lib/jobs/generated/pusher.cpp b/lib/jobs/generated/pusher.cpp
index 2937c124..4a9bde95 100644
--- a/lib/jobs/generated/pusher.cpp
+++ b/lib/jobs/generated/pusher.cpp
@@ -22,12 +22,12 @@ namespace QMatrixClient
template <> struct FromJson<GetPushersJob::PusherData>
{
- GetPushersJob::PusherData operator()(QJsonValue jv)
+ GetPushersJob::PusherData operator()(const QJsonValue& jv)
{
- QJsonObject o = jv.toObject();
+ const auto& o = jv.toObject();
GetPushersJob::PusherData result;
result.url =
- fromJson<QString>(o.value("url"));
+ fromJson<QString>(o.value("url"));
return result;
}
@@ -53,26 +53,26 @@ namespace QMatrixClient
template <> struct FromJson<GetPushersJob::Pusher>
{
- GetPushersJob::Pusher operator()(QJsonValue jv)
+ GetPushersJob::Pusher operator()(const QJsonValue& jv)
{
- QJsonObject o = jv.toObject();
+ const auto& o = jv.toObject();
GetPushersJob::Pusher result;
result.pushkey =
- fromJson<QString>(o.value("pushkey"));
+ fromJson<QString>(o.value("pushkey"));
result.kind =
- fromJson<QString>(o.value("kind"));
+ fromJson<QString>(o.value("kind"));
result.appId =
- fromJson<QString>(o.value("app_id"));
+ fromJson<QString>(o.value("app_id"));
result.appDisplayName =
- fromJson<QString>(o.value("app_display_name"));
+ fromJson<QString>(o.value("app_display_name"));
result.deviceDisplayName =
- fromJson<QString>(o.value("device_display_name"));
+ fromJson<QString>(o.value("device_display_name"));
result.profileTag =
- fromJson<QString>(o.value("profile_tag"));
+ fromJson<QString>(o.value("profile_tag"));
result.lang =
- fromJson<QString>(o.value("lang"));
+ fromJson<QString>(o.value("lang"));
result.data =
- fromJson<GetPushersJob::PusherData>(o.value("data"));
+ fromJson<GetPushersJob::PusherData>(o.value("data"));
return result;
}
@@ -124,12 +124,12 @@ namespace QMatrixClient
template <> struct FromJson<PostPusherJob::PusherData>
{
- PostPusherJob::PusherData operator()(QJsonValue jv)
+ PostPusherJob::PusherData operator()(const QJsonValue& jv)
{
- QJsonObject o = jv.toObject();
+ const auto& o = jv.toObject();
PostPusherJob::PusherData result;
result.url =
- fromJson<QString>(o.value("url"));
+ fromJson<QString>(o.value("url"));
return result;
}