aboutsummaryrefslogtreecommitdiff
path: root/lib/converters.h
diff options
context:
space:
mode:
authorKitsune Ral <Kitsune-Ral@users.sf.net>2018-07-01 11:48:05 +0900
committerKitsune Ral <Kitsune-Ral@users.sf.net>2018-07-01 11:48:05 +0900
commit84f44ed93e528bcedf4c4c3bc8e54377854f27d0 (patch)
treeb687d8db94b7830de8152ea122632f6dd460f52f /lib/converters.h
parent78a425ec47dff47a09e3547d041fdd3216aa1403 (diff)
downloadlibquotient-84f44ed93e528bcedf4c4c3bc8e54377854f27d0.tar.gz
libquotient-84f44ed93e528bcedf4c4c3bc8e54377854f27d0.zip
Cleanup
Diffstat (limited to 'lib/converters.h')
-rw-r--r--lib/converters.h8
1 files changed, 4 insertions, 4 deletions
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<T>& 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 <typename T>
struct FromJson
{
- T operator()(const QJsonValue& jv) const { return static_cast<T>(jv); }
+ T operator()(const QJsonValue& jv) const { return T(jv); }
};
template <typename T>