diff options
author | Black Hat <bhat@encom.eu.org> | 2018-09-12 21:04:29 +0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-09-12 21:04:29 +0800 |
commit | 1e78ca6b9c09cb16677ab3db1656085adbd4901b (patch) | |
tree | 633a6e8fe8a244b44b510b608ec3103431a0e042 /lib/converters.h | |
parent | 79f338877dec3de5ec7394f190025395877cb00b (diff) | |
parent | 2a1596c16baad77fc80391c66694101f91028deb (diff) | |
download | libquotient-1e78ca6b9c09cb16677ab3db1656085adbd4901b.tar.gz libquotient-1e78ca6b9c09cb16677ab3db1656085adbd4901b.zip |
Merge pull request #1 from QMatrixClient/master
Merge to latest commit.
Diffstat (limited to 'lib/converters.h')
-rw-r--r-- | lib/converters.h | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/lib/converters.h b/lib/converters.h index 1e828393..7f78effe 100644 --- a/lib/converters.h +++ b/lib/converters.h @@ -163,6 +163,11 @@ namespace QMatrixClient auto operator()(const QJsonValue& jv) const { return jv.toDouble(); } }; + template <> struct FromJson<float> + { + auto operator()(const QJsonValue& jv) const { return float(jv.toDouble()); } + }; + template <> struct FromJson<qint64> { auto operator()(const QJsonValue& jv) const { return qint64(jv.toDouble()); } |