Skip to content

Commit 4f9c4ee

Browse files
committed
Properties: explicitly declare default copy constructor
1 parent e649174 commit 4f9c4ee

File tree

8 files changed

+15
-7
lines changed

8 files changed

+15
-7
lines changed

src/property/types/CloudBool.h

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -36,11 +36,12 @@ class CloudBool : public Property {
3636
bool _value,
3737
_cloud_value;
3838
public:
39-
CloudBool() {
39+
CloudBool() {
4040
CloudBool(false);
4141
}
4242
CloudBool(bool v) : _value(v), _cloud_value(v) {}
43-
operator bool() const {
43+
CloudBool(const CloudBool &v) = default;
44+
operator bool() const {
4445
return _value;
4546
}
4647
virtual bool isDifferentFromCloud() {

src/property/types/CloudColor.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,7 @@ class Color {
3636
Color(float h, float s, float b): hue(h), sat(s), bri(b) {
3737
setColorHSB(h, s, b);
3838
}
39+
Color(const Color& ) = default;
3940

4041
bool setColorHSB(float h, float s, float b) {
4142
if (h < 0 || h > 360 || s < 0 || s > 100 || b < 0 || b > 100) {

src/property/types/CloudFloat.h

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,10 +39,11 @@ class CloudFloat : public Property {
3939
float _value,
4040
_cloud_value;
4141
public:
42-
CloudFloat() {
42+
CloudFloat() {
4343
CloudFloat(0.0f);
4444
}
4545
CloudFloat(float v) : _value(v), _cloud_value(v) {}
46+
CloudFloat(const CloudFloat& v) = default;
4647
operator float() const {
4748
return _value;
4849
}

src/property/types/CloudInt.h

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,10 +36,11 @@ class CloudInt : public Property {
3636
int _value,
3737
_cloud_value;
3838
public:
39-
CloudInt() {
39+
CloudInt() {
4040
CloudInt(0);
4141
}
4242
CloudInt(int v) : _value(v), _cloud_value(v) {}
43+
CloudInt(const CloudInt& v) = default;
4344
operator int() const {
4445
return _value;
4546
}

src/property/types/CloudLocation.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,7 @@ class Location {
3737
float lat,
3838
lon;
3939
Location(float lat, float lon) : lat(lat), lon(lon) {}
40+
Location(const Location&) = default;
4041
Location& operator=(Location& aLocation) {
4142
lat = aLocation.lat;
4243
lon = aLocation.lon;

src/property/types/CloudSchedule.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -112,6 +112,7 @@ class Schedule {
112112
public:
113113
ScheduleTimeType frm, to, len, msk;
114114
Schedule(ScheduleTimeType s, ScheduleTimeType e, ScheduleTimeType d, ScheduleConfigurationType m): frm(s), to(e), len(d), msk(m) {}
115+
Schedule(const Schedule& aSchedule) = default;
115116

116117
bool isActive() {
117118

src/property/types/CloudString.h

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -36,13 +36,14 @@ class CloudString : public Property {
3636
String _value,
3737
_cloud_value;
3838
public:
39-
CloudString() {
39+
CloudString() {
4040
CloudString("");
4141
}
42-
CloudString(const char *v) {
42+
CloudString(const char *v) {
4343
CloudString(String(v));
4444
}
4545
CloudString(String v) : _value(v), _cloud_value(v) {}
46+
CloudString(const CloudString& v) = default;
4647
operator String() const {
4748
return _value;
4849
}

src/property/types/CloudUnsignedInt.h

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,10 +36,11 @@ class CloudUnsignedInt : public Property {
3636
unsigned int _value,
3737
_cloud_value;
3838
public:
39-
CloudUnsignedInt() {
39+
CloudUnsignedInt() {
4040
CloudUnsignedInt(0);
4141
}
4242
CloudUnsignedInt(unsigned int v) : _value(v), _cloud_value(v) {}
43+
CloudUnsignedInt(const CloudUnsignedInt &v) = default;
4344
operator unsigned int() const {
4445
return _value;
4546
}

0 commit comments

Comments
 (0)