MCPcopy Create free account
hub / github.com/FastLED/FastLED / format_impl

Function format_impl

src/fl/stl/stdio.h:563–582  ·  view source on GitHub ↗

Base case: no more arguments

Source from the content-addressed store, hash-verified

561
562// Base case: no more arguments
563inline void format_impl(sstream& stream, const char* format) FL_NOEXCEPT {
564 while (*format) {
565 if (*format == '%') {
566 FormatSpec spec = parse_format_spec(format);
567 if (spec.type == '%') {
568 stream << "%";
569 continue;
570 } else {
571 // No argument for format specifier
572 stream << "<missing_arg>";
573 continue;
574 }
575 } else {
576 // Create a single-character string since sstream treats char as number
577 char temp_str[2] = {*format, '\0'};
578 stream << temp_str;
579 ++format;
580 }
581 }
582}
583
584// Recursive case: process one argument and continue
585template<typename T, typename... Args>

Callers 2

printfFunction · 0.70
snprintfFunction · 0.70

Calls 2

format_argFunction · 0.85
parse_format_specFunction · 0.70

Tested by

no test coverage detected