From 84f44ed93e528bcedf4c4c3bc8e54377854f27d0 Mon Sep 17 00:00:00 2001 From: Kitsune Ral Date: Sun, 1 Jul 2018 11:48:05 +0900 Subject: Cleanup --- lib/converters.h | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'lib/converters.h') diff --git a/lib/converters.h b/lib/converters.h index 28bb14cf..a59809e7 100644 --- a/lib/converters.h +++ b/lib/converters.h @@ -65,8 +65,8 @@ namespace QMatrixClient public: explicit Omittable() : Omittable(none) { } Omittable(NoneTag) : _omitted(true) { } - Omittable(const T& val) : _value(val), _omitted(false) { } - Omittable(T&& val) : _value(std::move(val)), _omitted(false) { } + Omittable(const T& val) : _value(val) { } + Omittable(T&& val) : _value(std::move(val)) { } Omittable& operator=(const T& val) { _value = val; @@ -89,7 +89,7 @@ namespace QMatrixClient private: T _value; - bool _omitted; + bool _omitted = false; }; // This catches anything implicitly convertible to QJsonValue/Object/Array @@ -175,7 +175,7 @@ namespace QMatrixClient template struct FromJson { - T operator()(const QJsonValue& jv) const { return static_cast(jv); } + T operator()(const QJsonValue& jv) const { return T(jv); } }; template -- cgit v1.2.3