From cbb7c2d7eff7ac8724d766ade2c3e659d15d97e2 Mon Sep 17 00:00:00 2001 From: Kitsune Ral Date: Mon, 30 Apr 2018 22:17:04 +0900 Subject: jobs/generated: cleanup C++ --- lib/jobs/generated/pusher.cpp | 32 ++++++++++++++++---------------- 1 file changed, 16 insertions(+), 16 deletions(-) (limited to 'lib/jobs/generated/pusher.cpp') 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 operator()(QJsonValue jv) + GetPushersJob::PusherData operator()(const QJsonValue& jv) { - QJsonObject o = jv.toObject(); + const auto& o = jv.toObject(); GetPushersJob::PusherData result; result.url = - fromJson(o.value("url")); + fromJson(o.value("url")); return result; } @@ -53,26 +53,26 @@ namespace QMatrixClient template <> struct FromJson { - 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(o.value("pushkey")); + fromJson(o.value("pushkey")); result.kind = - fromJson(o.value("kind")); + fromJson(o.value("kind")); result.appId = - fromJson(o.value("app_id")); + fromJson(o.value("app_id")); result.appDisplayName = - fromJson(o.value("app_display_name")); + fromJson(o.value("app_display_name")); result.deviceDisplayName = - fromJson(o.value("device_display_name")); + fromJson(o.value("device_display_name")); result.profileTag = - fromJson(o.value("profile_tag")); + fromJson(o.value("profile_tag")); result.lang = - fromJson(o.value("lang")); + fromJson(o.value("lang")); result.data = - fromJson(o.value("data")); + fromJson(o.value("data")); return result; } @@ -124,12 +124,12 @@ namespace QMatrixClient template <> struct FromJson { - 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(o.value("url")); + fromJson(o.value("url")); return result; } -- cgit v1.2.3