mirror of
https://github.com/mruby/mruby
synced 2026-06-08 16:11:16 +00:00
7ae73ac7e4
Replace the inline switch with a separate fast_fmt_ok() function that maps each format character to a validity code (0=invalid, 1=arg spec, 2=separator). Modern compilers generally lower this to a jump table, so the per-character cost remains effectively O(1). Keeping this as a switch (instead of a C99 array-index designator lookup table) also lets the file compile cleanly as C++. Co-authored-by: Claude <noreply@anthropic.com>