FastLED 3.10.8
Loading...
Searching...
No Matches

◆ operator()() [11/13]

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

Definition at line 575 of file types.h.

575 {
576 // AUTO CONVERT INT TO FLOAT. Route through int32 to avoid pulling
577 // libgcc-nofp's `_floatdisf.o` soft-double cascade on no-FPU targets.
578 // The double path (`as_double()`) is DCE'd from LowMemory builds today,
579 // but keep the int32-route here as defense-in-depth. See FastLED #3076.
580 if (value > 2147483647LL) {
581 result = static_cast<double>(2147483647);
582 } else if (value < -2147483648LL) {
583 result = static_cast<double>(-2147483648);
584 } else {
585 result = static_cast<double>(static_cast<fl::i32>(value));
586 }
587 }
fl::optional< double > result
Definition types.h:553

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