From 28d2bc353ebbddc0ce0b96a634108392eb1089b4 Mon Sep 17 00:00:00 2001 From: Scott Lahteine Date: Sat, 1 Jan 2022 16:48:24 -0600 Subject: [PATCH] =?UTF-8?q?=F0=9F=8E=A8=20Use=20LEDColor=20default=20C-CTO?= =?UTF-8?q?R?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Marlin/src/feature/leds/leds.h | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/Marlin/src/feature/leds/leds.h b/Marlin/src/feature/leds/leds.h index bce9052424..8649dd014f 100644 --- a/Marlin/src/feature/leds/leds.h +++ b/Marlin/src/feature/leds/leds.h @@ -54,6 +54,8 @@ typedef struct LEDColor { 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)) : 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; } - LEDColor& operator=(const LEDColor &right) { - if (this != &right) memcpy(this, &right, sizeof(LEDColor)); - return *this; - } - bool operator==(const LEDColor &right) { if (this == &right) return true; return 0 == memcmp(this, &right, sizeof(LEDColor));