explicit constructor (#415)

This commit is contained in:
Michael Miller
2021-01-26 23:28:12 -08:00
committed by GitHub
parent 5e7b58ed49
commit 0846cfbc93
2 changed files with 14 additions and 0 deletions

View File

@@ -30,6 +30,14 @@ License along with NeoPixel. If not, see
#include "HslColor.h"
#include "HsbColor.h"
#include "HtmlColor.h"
#include "RgbwColor.h"
RgbColor::RgbColor(const RgbwColor& color) :
R(color.R),
G(color.G),
B(color.B)
{
};
RgbColor::RgbColor(const Rgb16Color& color)
{

View File

@@ -29,6 +29,7 @@ License along with NeoPixel. If not, see
#include "NeoSettings.h"
#include "RgbColorBase.h"
struct RgbwColor;
// ------------------------------------------------------------------------
// RgbColor represents a color object that is represented by Red, Green, Blue
@@ -57,6 +58,11 @@ struct RgbColor : RgbColorBase
{
};
// ------------------------------------------------------------------------
// explicitly Construct a RgbColor using RgbwColor
// ------------------------------------------------------------------------
explicit RgbColor(const RgbwColor& color);
// ------------------------------------------------------------------------
// Construct a RgbColor using Rgb16Color
// ------------------------------------------------------------------------