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

◆ operator()() [11/13]

void fl::float_conversion_visitor< double >::operator() ( const i64 & value)
inline

Definition at line 522 of file types.h.

522 {
523 // AUTO CONVERT INT TO FLOAT. Route through int32 to avoid pulling
524 // libgcc-nofp's `_floatdisf.o` soft-double cascade on no-FPU targets.
525 // The double path (`as_double()`) is DCE'd from LowMemory builds today,
526 // but keep the int32-route here as defense-in-depth. See FastLED #3076.
527 if (value > 2147483647LL) {
528 result = static_cast<double>(2147483647);
529 } else if (value < -2147483648LL) {
530 result = static_cast<double>(-2147483648);
531 } else {
532 result = static_cast<double>(static_cast<fl::i32>(value));
533 }
534 }
fl::optional< double > result
Definition types.h:506

References FL_NOEXCEPT, result, and fl::type_rank< T >::value.