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

◆ operator()() [7/10]

template<typename T>
void fl::detail::JsonToIntegerVisitor< T >::operator() ( const float & raw)
inline

Definition at line 43 of file json_visitors.h.

43 {
44 mValue = static_cast<T>(raw);
45 // Keep the precision check in single precision. The natural
46 // formulation `(double)raw != (double)mValue` drags libgcc's
47 // soft-double helpers (`__aeabi_dcmpeq`, `__ledf2`, `__gedf2`,
48 // `__aeabi_d2f`, ...) into the link on no-FPU targets — ~760 B
49 // we can't afford on LPC845 (FastLED #3002).
50 if (raw != static_cast<float>(mValue)) {
51 mResult.addWarning("float " + fl::to_string(raw, 6) +
52 " truncated to int " + fl::to_string(static_cast<i64>(mValue)));
53 }
54 }

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

+ Here is the call graph for this function: