FastLED 3.9.15
Loading...
Searching...
No Matches

◆ operator()() [1/10]

template<typename T>
void fl::detail::JsonToFloatVisitor< T >::operator() ( const bool & b)
inline

Definition at line 201 of file json_visitors.h.

201 {
202 mValue = b ? T(1) : T(0);
203 // Format through float to avoid pulling in double helpers on no-FPU
204 // targets (FastLED #3002). For T = double the round-trip costs one
205 // extra `.0f` digit of formatting precision, which is acceptable.
206 mResult.addWarning("bool converted to float " + fl::to_string(static_cast<float>(mValue), 6));
207 }
TypeConversionResult mResult

References mResult, mValue, and fl::to_string().

+ Here is the call graph for this function: