diff --git a/src/property/types/CloudBool.h b/src/property/types/CloudBool.h index 3434656fc..50ed3dc74 100644 --- a/src/property/types/CloudBool.h +++ b/src/property/types/CloudBool.h @@ -36,11 +36,12 @@ class CloudBool : public Property { bool _value, _cloud_value; public: - CloudBool() { + CloudBool() { CloudBool(false); } CloudBool(bool v) : _value(v), _cloud_value(v) {} - operator bool() const { + CloudBool(const CloudBool &v) = default; + operator bool() const { return _value; } virtual bool isDifferentFromCloud() { diff --git a/src/property/types/CloudColor.h b/src/property/types/CloudColor.h index 54cb4f30f..6f224af68 100644 --- a/src/property/types/CloudColor.h +++ b/src/property/types/CloudColor.h @@ -36,6 +36,7 @@ class Color { Color(float h, float s, float b): hue(h), sat(s), bri(b) { setColorHSB(h, s, b); } + Color(const Color& ) = default; bool setColorHSB(float h, float s, float b) { if (h < 0 || h > 360 || s < 0 || s > 100 || b < 0 || b > 100) { diff --git a/src/property/types/CloudFloat.h b/src/property/types/CloudFloat.h index 1918f9669..39a9b4bcb 100644 --- a/src/property/types/CloudFloat.h +++ b/src/property/types/CloudFloat.h @@ -39,10 +39,11 @@ class CloudFloat : public Property { float _value, _cloud_value; public: - CloudFloat() { + CloudFloat() { CloudFloat(0.0f); } CloudFloat(float v) : _value(v), _cloud_value(v) {} + CloudFloat(const CloudFloat& v) = default; operator float() const { return _value; } diff --git a/src/property/types/CloudInt.h b/src/property/types/CloudInt.h index 37e4d3cae..075bb589b 100644 --- a/src/property/types/CloudInt.h +++ b/src/property/types/CloudInt.h @@ -36,10 +36,11 @@ class CloudInt : public Property { int _value, _cloud_value; public: - CloudInt() { + CloudInt() { CloudInt(0); } CloudInt(int v) : _value(v), _cloud_value(v) {} + CloudInt(const CloudInt& v) = default; operator int() const { return _value; } diff --git a/src/property/types/CloudLocation.h b/src/property/types/CloudLocation.h index cd4f0dc67..3deda9e52 100644 --- a/src/property/types/CloudLocation.h +++ b/src/property/types/CloudLocation.h @@ -37,6 +37,7 @@ class Location { float lat, lon; Location(float lat, float lon) : lat(lat), lon(lon) {} + Location(const Location&) = default; Location& operator=(Location& aLocation) { lat = aLocation.lat; lon = aLocation.lon; diff --git a/src/property/types/CloudSchedule.h b/src/property/types/CloudSchedule.h index 9a9222968..3e5703eed 100644 --- a/src/property/types/CloudSchedule.h +++ b/src/property/types/CloudSchedule.h @@ -112,6 +112,7 @@ class Schedule { public: ScheduleTimeType frm, to, len, msk; Schedule(ScheduleTimeType s, ScheduleTimeType e, ScheduleTimeType d, ScheduleConfigurationType m): frm(s), to(e), len(d), msk(m) {} + Schedule(const Schedule& aSchedule) = default; bool isActive() { diff --git a/src/property/types/CloudString.h b/src/property/types/CloudString.h index f884720c0..2919efbb4 100644 --- a/src/property/types/CloudString.h +++ b/src/property/types/CloudString.h @@ -36,13 +36,14 @@ class CloudString : public Property { String _value, _cloud_value; public: - CloudString() { + CloudString() { CloudString(""); } - CloudString(const char *v) { + CloudString(const char *v) { CloudString(String(v)); } CloudString(String v) : _value(v), _cloud_value(v) {} + CloudString(const CloudString& v) = default; operator String() const { return _value; } diff --git a/src/property/types/CloudUnsignedInt.h b/src/property/types/CloudUnsignedInt.h index 40bed697a..0e21f739f 100644 --- a/src/property/types/CloudUnsignedInt.h +++ b/src/property/types/CloudUnsignedInt.h @@ -36,10 +36,11 @@ class CloudUnsignedInt : public Property { unsigned int _value, _cloud_value; public: - CloudUnsignedInt() { + CloudUnsignedInt() { CloudUnsignedInt(0); } CloudUnsignedInt(unsigned int v) : _value(v), _cloud_value(v) {} + CloudUnsignedInt(const CloudUnsignedInt &v) = default; operator unsigned int() const { return _value; }