forked from Makuna/NeoPixelBus
Merge pull request #129 from Makuna/ProtectFromMinMaxMacros
removed use of macro
This commit is contained in:
@@ -208,7 +208,7 @@ public:
|
||||
{
|
||||
uint8_t* p = getPixelAddress(pPixels, indexPixel);
|
||||
|
||||
*p++ = 0xE0 | min(color.W, 31); // upper three bits are always 111
|
||||
*p++ = 0xE0 | (color.W < 31 ? color.W : 31); // upper three bits are always 111
|
||||
*p++ = color.B;
|
||||
*p++ = color.G;
|
||||
*p = color.R;
|
||||
@@ -290,7 +290,7 @@ public:
|
||||
{
|
||||
uint8_t* p = getPixelAddress(pPixels, indexPixel);
|
||||
|
||||
*p++ = 0xE0 | min(color.W, 31); // upper three bits are always 111
|
||||
*p++ = 0xE0 | (color.W < 31 ? color.W : 31); // upper three bits are always 111
|
||||
*p++ = color.G;
|
||||
*p++ = color.R;
|
||||
*p = color.B;
|
||||
|
@@ -52,7 +52,7 @@ size_t HtmlColor::ToNumericalString(char* buf, size_t bufSize) const
|
||||
color >>= 4;
|
||||
}
|
||||
|
||||
buf[min(bufLen, 7)] = 0;
|
||||
buf[(bufLen < 7 ? bufLen : 7)] = 0;
|
||||
}
|
||||
return 7;
|
||||
}
|
||||
|
Reference in New Issue
Block a user