🎨 Use LEDColor default C-CTOR
This commit is contained in:
parent
7b5e2cd786
commit
28d2bc353e
|
@ -54,6 +54,8 @@ typedef struct LEDColor {
|
||||||
OPTARG(NEOPIXEL_LED, i(NEOPIXEL_BRIGHTNESS))
|
OPTARG(NEOPIXEL_LED, i(NEOPIXEL_BRIGHTNESS))
|
||||||
{}
|
{}
|
||||||
|
|
||||||
|
LEDColor(const LEDColor&) = default;
|
||||||
|
|
||||||
LEDColor(uint8_t r, uint8_t g, uint8_t b OPTARG(HAS_WHITE_LED, uint8_t w=0) OPTARG(NEOPIXEL_LED, uint8_t i=NEOPIXEL_BRIGHTNESS))
|
LEDColor(uint8_t r, uint8_t g, uint8_t b OPTARG(HAS_WHITE_LED, uint8_t w=0) OPTARG(NEOPIXEL_LED, uint8_t i=NEOPIXEL_BRIGHTNESS))
|
||||||
: r(r), g(g), b(b) OPTARG(HAS_WHITE_LED, w(w)) OPTARG(NEOPIXEL_LED, i(i)) {}
|
: r(r), g(g), b(b) OPTARG(HAS_WHITE_LED, w(w)) OPTARG(NEOPIXEL_LED, i(i)) {}
|
||||||
|
|
||||||
|
@ -68,11 +70,6 @@ typedef struct LEDColor {
|
||||||
return *this;
|
return *this;
|
||||||
}
|
}
|
||||||
|
|
||||||
LEDColor& operator=(const LEDColor &right) {
|
|
||||||
if (this != &right) memcpy(this, &right, sizeof(LEDColor));
|
|
||||||
return *this;
|
|
||||||
}
|
|
||||||
|
|
||||||
bool operator==(const LEDColor &right) {
|
bool operator==(const LEDColor &right) {
|
||||||
if (this == &right) return true;
|
if (this == &right) return true;
|
||||||
return 0 == memcmp(this, &right, sizeof(LEDColor));
|
return 0 == memcmp(this, &right, sizeof(LEDColor));
|
||||||
|
|
Loading…
Reference in a new issue