From 553df1d57bf743ea962728aa6530a4acacf2581e Mon Sep 17 00:00:00 2001 From: Oxan van Leeuwen Date: Tue, 10 Aug 2021 09:53:48 +0200 Subject: [PATCH] Don't mark COLOR_* constants as static in header (#2141) --- esphome/core/color.cpp | 3 +++ esphome/core/color.h | 4 ++-- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/esphome/core/color.cpp b/esphome/core/color.cpp index b9a9f27e46..58d995db2f 100644 --- a/esphome/core/color.cpp +++ b/esphome/core/color.cpp @@ -5,4 +5,7 @@ namespace esphome { const Color Color::BLACK(0, 0, 0, 0); const Color Color::WHITE(255, 255, 255, 255); +const Color COLOR_BLACK(0, 0, 0, 0); +const Color COLOR_WHITE(255, 255, 255, 255); + } // namespace esphome diff --git a/esphome/core/color.h b/esphome/core/color.h index ba1a855e86..c9ca3bcfc3 100644 --- a/esphome/core/color.h +++ b/esphome/core/color.h @@ -149,8 +149,8 @@ struct Color { }; ESPDEPRECATED("Use Color::BLACK instead of COLOR_BLACK", "v1.21") -static const Color COLOR_BLACK(0, 0, 0, 0); +extern const Color COLOR_BLACK; ESPDEPRECATED("Use Color::WHITE instead of COLOR_WHITE", "v1.21") -static const Color COLOR_WHITE(255, 255, 255, 255); +extern const Color COLOR_WHITE; } // namespace esphome