Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 3 additions & 2 deletions src/property/types/CloudBool.h
Original file line number Diff line number Diff line change
Expand Up @@ -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() {
Expand Down
1 change: 1 addition & 0 deletions src/property/types/CloudColor.h
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand Down
3 changes: 2 additions & 1 deletion src/property/types/CloudFloat.h
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
Expand Down
3 changes: 2 additions & 1 deletion src/property/types/CloudInt.h
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
Expand Down
1 change: 1 addition & 0 deletions src/property/types/CloudLocation.h
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
1 change: 1 addition & 0 deletions src/property/types/CloudSchedule.h
Original file line number Diff line number Diff line change
Expand Up @@ -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() {

Expand Down
5 changes: 3 additions & 2 deletions src/property/types/CloudString.h
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
Expand Down
3 changes: 2 additions & 1 deletion src/property/types/CloudUnsignedInt.h
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
Expand Down
Loading