From f8df694aa302ba0f7f935241ea8f4e76c7ddd9f1 Mon Sep 17 00:00:00 2001 From: Jimmy Hedman Date: Thu, 13 Jul 2023 02:32:05 +0200 Subject: [PATCH] Mk2 to prepare color.h for idf >= 5 (#5070) --- esphome/core/color.h | 15 --------------- 1 file changed, 15 deletions(-) diff --git a/esphome/core/color.h b/esphome/core/color.h index 7062a2a8c8..45b2d4c871 100644 --- a/esphome/core/color.h +++ b/esphome/core/color.h @@ -57,21 +57,6 @@ struct Color { inline bool operator!=(uint32_t colorcode) { // NOLINT return this->raw_32 != colorcode; } - - inline Color &operator=(const Color &rhs) ALWAYS_INLINE { // NOLINT - this->r = rhs.r; - this->g = rhs.g; - this->b = rhs.b; - this->w = rhs.w; - return *this; - } - inline Color &operator=(uint32_t colorcode) ALWAYS_INLINE { - this->w = (colorcode >> 24) & 0xFF; - this->r = (colorcode >> 16) & 0xFF; - this->g = (colorcode >> 8) & 0xFF; - this->b = (colorcode >> 0) & 0xFF; - return *this; - } inline uint8_t &operator[](uint8_t x) ALWAYS_INLINE { return this->raw[x]; } inline Color operator*(uint8_t scale) const ALWAYS_INLINE { return Color(esp_scale8(this->red, scale), esp_scale8(this->green, scale), esp_scale8(this->blue, scale),