From aacc4bcb4a487871daae6717f77605aaba444341 Mon Sep 17 00:00:00 2001 From: Marc Deop Date: Sat, 2 Mar 2019 12:26:57 +0100 Subject: style: apply .clang-format to all .cpp and .h files --- lib/csapi/definitions/device_keys.cpp | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) (limited to 'lib/csapi/definitions/device_keys.cpp') diff --git a/lib/csapi/definitions/device_keys.cpp b/lib/csapi/definitions/device_keys.cpp index 1e79499f..cc5262b7 100644 --- a/lib/csapi/definitions/device_keys.cpp +++ b/lib/csapi/definitions/device_keys.cpp @@ -6,8 +6,8 @@ using namespace QMatrixClient; -void JsonObjectConverter::dumpTo( - QJsonObject& jo, const DeviceKeys& pod) +void JsonObjectConverter::dumpTo(QJsonObject& jo, + const DeviceKeys& pod) { addParam<>(jo, QStringLiteral("user_id"), pod.userId); addParam<>(jo, QStringLiteral("device_id"), pod.deviceId); @@ -16,8 +16,8 @@ void JsonObjectConverter::dumpTo( addParam<>(jo, QStringLiteral("signatures"), pod.signatures); } -void JsonObjectConverter::fillFrom( - const QJsonObject& jo, DeviceKeys& result) +void JsonObjectConverter::fillFrom(const QJsonObject& jo, + DeviceKeys& result) { fromJson(jo.value("user_id"_ls), result.userId); fromJson(jo.value("device_id"_ls), result.deviceId); @@ -25,4 +25,3 @@ void JsonObjectConverter::fillFrom( fromJson(jo.value("keys"_ls), result.keys); fromJson(jo.value("signatures"_ls), result.signatures); } - -- cgit v1.2.3 From 9e96bc9b8dec6613e3e2f2fd564e9f6bee9bbce4 Mon Sep 17 00:00:00 2001 From: Kitsune Ral Date: Mon, 24 Jun 2019 07:38:50 +0900 Subject: csapi/*/**: clang-format contents of csapi subdirs as well --- lib/csapi/definitions/device_keys.cpp | 15 +++++---------- 1 file changed, 5 insertions(+), 10 deletions(-) (limited to 'lib/csapi/definitions/device_keys.cpp') diff --git a/lib/csapi/definitions/device_keys.cpp b/lib/csapi/definitions/device_keys.cpp index ffe0cfbe..cc5262b7 100644 --- a/lib/csapi/definitions/device_keys.cpp +++ b/lib/csapi/definitions/device_keys.cpp @@ -4,29 +4,24 @@ #include "device_keys.h" - using namespace QMatrixClient; - -void JsonObjectConverter::dumpTo(QJsonObject& jo, const DeviceKeys& pod) +void JsonObjectConverter::dumpTo(QJsonObject& jo, + const DeviceKeys& pod) { addParam<>(jo, QStringLiteral("user_id"), pod.userId); addParam<>(jo, QStringLiteral("device_id"), pod.deviceId); addParam<>(jo, QStringLiteral("algorithms"), pod.algorithms); addParam<>(jo, QStringLiteral("keys"), pod.keys); addParam<>(jo, QStringLiteral("signatures"), pod.signatures); - } - -void JsonObjectConverter::fillFrom(const QJsonObject& jo, DeviceKeys& result) + +void JsonObjectConverter::fillFrom(const QJsonObject& jo, + DeviceKeys& result) { fromJson(jo.value("user_id"_ls), result.userId); fromJson(jo.value("device_id"_ls), result.deviceId); fromJson(jo.value("algorithms"_ls), result.algorithms); fromJson(jo.value("keys"_ls), result.keys); fromJson(jo.value("signatures"_ls), result.signatures); - } - - - -- cgit v1.2.3