diff options
author | Kitsune Ral <Kitsune-Ral@users.sf.net> | 2018-06-02 13:32:47 +0900 |
---|---|---|
committer | Kitsune Ral <Kitsune-Ral@users.sf.net> | 2018-06-02 13:32:47 +0900 |
commit | 0dd491fbd189baaabadcab2344a05e3cf3898287 (patch) | |
tree | 13b8ebe63ba8b156ddd6ddab8b0ad2845d7c9c42 /lib/csapi/{{base}}.h.mustache | |
parent | e7ac6f3480358fd989c8a3090590d665d18e1cec (diff) | |
download | libquotient-0dd491fbd189baaabadcab2344a05e3cf3898287.tar.gz libquotient-0dd491fbd189baaabadcab2344a05e3cf3898287.zip |
csapi: Use Omittable<> container instead of intrusive 'omitted' field
Also: use the latest feature of GTAD, +set/+on, to make gtad.yaml more compact.
Diffstat (limited to 'lib/csapi/{{base}}.h.mustache')
-rw-r--r-- | lib/csapi/{{base}}.h.mustache | 12 |
1 files changed, 4 insertions, 8 deletions
diff --git a/lib/csapi/{{base}}.h.mustache b/lib/csapi/{{base}}.h.mustache index 6f08e871..1d24163f 100644 --- a/lib/csapi/{{base}}.h.mustache +++ b/lib/csapi/{{base}}.h.mustache @@ -13,10 +13,8 @@ namespace QMatrixClient {{# model}} struct {{name}}{{#parents?}} : {{#parents}}{{name}}{{#@join}}, {{/@join}}{{/parents}}{{/parents?}} { -{{#vars}} {{dataType.name}} {{nameCamelCase}}; -{{/vars}}{{#in?}} - bool omitted; -{{/in?}} }; +{{#vars}} {{>maybeOmittableType}} {{nameCamelCase}}; +{{/vars}} }; {{#in?}} QJsonObject toJson(const {{name}}& pod); {{/in?}}{{#out?}} @@ -34,10 +32,8 @@ namespace QMatrixClient {{# model}} struct {{name}}{{#parents?}} : {{#parents}}{{name}}{{#@join}}, {{/@join}}{{/parents}}{{/parents?}} { -{{#vars}} {{dataType.name}} {{nameCamelCase}}; -{{/vars}}{{#in?}} - bool omitted; -{{/in?}} }; +{{#vars}} {{>maybeOmittableType}} {{nameCamelCase}}; +{{/vars}} }; {{/ model}} // Construction/destruction {{/ models}} |