FastLED 3.10.10
Loading...
Searching...
No Matches

◆ accept() [7/10]

template<typename Sink>
void fl::SerializerVisitor< Sink >::accept ( const float & f)
inline

Definition at line 1314 of file json.cpp.hpp.

1314 {
1315#if FL_PLATFORM_HAS_LARGE_MEMORY
1316 // Integer-only bits -> decimal (FastLED #3022 phase 2). Default 3-digit
1317 // precision matches the previous `num_str.append(f, 3)` contract.
1319#else
1320 // Low-memory targets gate the float decimal codec to drop
1321 // `ieee754_format_decimal` (594 B) + `kPow10Mant` LUT (824 B) from the
1322 // link. The integer-only RPC contract on LPC8xx / AVR-class targets
1323 // never serializes float values; this writes a stub for the rare cases
1324 // where a `json(float)` round-trip happens to be exercised in test
1325 // code that also runs on Low-memory. See FastLED #3082.
1326 (void)f;
1327 append_str(fl::string("0"));
1328#endif
1329 }
void append_str(const fl::string &str) FL_NO_EXCEPT

References append_str(), fl::bit_cast(), fl::FL_NO_EXCEPT, and fl::ieee754_format_decimal().

+ Here is the call graph for this function: