| 1920 | } |
| 1921 | |
| 1922 | void ImFormatStringToTempBufferV(const char** out_buf, const char** out_buf_end, const char* fmt, va_list args) |
| 1923 | { |
| 1924 | ImGuiContext& g = *GImGui; |
| 1925 | if (fmt[0] == '%' && fmt[1] == 's' && fmt[2] == 0) |
| 1926 | { |
| 1927 | const char* buf = va_arg(args, const char*); // Skip formatting when using "%s" |
| 1928 | *out_buf = buf; |
| 1929 | if (out_buf_end) { *out_buf_end = buf + strlen(buf); } |
| 1930 | } |
| 1931 | else |
| 1932 | { |
| 1933 | int buf_len = ImFormatStringV(g.TempBuffer.Data, g.TempBuffer.Size, fmt, args); |
| 1934 | *out_buf = g.TempBuffer.Data; |
| 1935 | if (out_buf_end) { *out_buf_end = g.TempBuffer.Data + buf_len; } |
| 1936 | } |
| 1937 | } |
| 1938 | |
| 1939 | // CRC32 needs a 1KB lookup table (not cache friendly) |
| 1940 | // Although the code to generate the table is simple and shorter than the table itself, using a const table allows us to easily: |
no test coverage detected