From e7df1390b98cb6a4b0cae1558c331a8e79d71f95 Mon Sep 17 00:00:00 2001 From: Kitsune Ral Date: Thu, 12 Oct 2017 16:08:18 +0200 Subject: {{templates}} polishing --- jobs/{{base}}.cpp.mustache | 2 +- jobs/{{base}}.h.mustache | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/jobs/{{base}}.cpp.mustache b/jobs/{{base}}.cpp.mustache index beab77df..45668d4c 100644 --- a/jobs/{{base}}.cpp.mustache +++ b/jobs/{{base}}.cpp.mustache @@ -52,7 +52,7 @@ class {{camelCaseOperationId}}Job::Private delete d; } {{# properties}} -{{dataType}} {{camelCaseOperationId}}Job::{{paramName}}() const +const {{dataType}}& {{camelCaseOperationId}}Job::{{paramName}}() const { return d->{{paramName}}; } diff --git a/jobs/{{base}}.h.mustache b/jobs/{{base}}.h.mustache index 08372b77..ad8a2f1f 100644 --- a/jobs/{{base}}.h.mustache +++ b/jobs/{{base}}.h.mustache @@ -32,9 +32,9 @@ namespace QMatrixClient public: explicit {{camelCaseOperationId}}Job({{#allParams}}{{#avoidCopy?}}const {{dataType}}&{{/avoidCopy?}}{{^avoidCopy?}}{{dataType}}{{/avoidCopy?}} {{paramName}}{{^required?}} = {{defaultValue}}{{^defaultValue}}{}{{/defaultValue}}{{/required?}}{{#hasMore}}, {{/hasMore}}{{/allParams}}); {{# responses}}{{#normalResponse?}}{{#properties?}} - virtual ~{{camelCaseOperationId}}Job(); + ~{{camelCaseOperationId}}Job() override; - {{#properties}}{{dataType}} {{paramName}}() const; + {{#properties}}const {{dataType}}& {{paramName}}() const; {{/properties}} protected: {{^returnFile}}Status parseJson(const QJsonDocument& data) override;{{/returnFile}} -- cgit v1.2.3