You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Making CRGB::operator bool() explicit would be useful #819
It's easy to assign CRGB to an integral value for a number of reasons, however, if you aren't careful to use your own, for example, uint32 toColor function, the bool() operator is used.
My suggestion is to make CRGB::operator bool()explicit.
Thanks for the suggestion; I think it's a great idea.
I want to think about how and in what ways this is going to change the (compile-time or run-time) behavior of existing code, but overall I really like this idea.
Yes, a large enough set of users means even testing things that "shouldn't" have an effect. 😀
Having said that, I'm willing to bet adding explicit here will find usage errors in code that attempts to assign to any integral value, having an unintended consequence.
Activity
kriegsman commentedon Jun 17, 2019
Thanks for the suggestion; I think it's a great idea.
I want to think about how and in what ways this is going to change the (compile-time or run-time) behavior of existing code, but overall I really like this idea.
ssilverman commentedon Jun 17, 2019
Yes, a large enough set of users means even testing things that "shouldn't" have an effect. 😀
Having said that, I'm willing to bet adding
explicithere will find usage errors in code that attempts to assign to any integral value, having an unintended consequence.upgrade to FastLED 3.6.0
upgrade to FastLED 3.6.0