From 89a9656025e938a24a2ce8949e7aaf1aacaae37b Mon Sep 17 00:00:00 2001 From: Kitsune Ral Date: Tue, 30 Jan 2018 15:44:48 +0900 Subject: RequestData: use auto Should improve compatibility with compilers that don't like conversions between different std::unique_ptr<> types. --- jobs/requestdata.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/jobs/requestdata.cpp b/jobs/requestdata.cpp index f5516c5f..5cb62221 100644 --- a/jobs/requestdata.cpp +++ b/jobs/requestdata.cpp @@ -8,7 +8,7 @@ using namespace QMatrixClient; -std::unique_ptr fromData(const QByteArray& data) +auto fromData(const QByteArray& data) { auto source = std::make_unique(); source->open(QIODevice::WriteOnly); @@ -18,7 +18,7 @@ std::unique_ptr fromData(const QByteArray& data) } template -inline std::unique_ptr fromJson(const JsonDataT& jdata) +inline auto fromJson(const JsonDataT& jdata) { return fromData(QJsonDocument(jdata).toJson(QJsonDocument::Compact)); } -- cgit v1.2.3