File tree Expand file tree Collapse file tree 1 file changed +0
-23
lines changed Expand file tree Collapse file tree 1 file changed +0
-23
lines changed Original file line number Diff line number Diff line change @@ -340,29 +340,6 @@ __get_cxx_version ()
340
340
restore_output ();
341
341
}
342
342
343
- static std::string c_format (const char * format, std::va_list args)
344
- {
345
- // Call vsnprintf once to determine the required buffer length. The
346
- // return value is the number of characters _excluding_ the null byte.
347
- std::va_list args_bufsz;
348
- va_copy (args_bufsz, args);
349
- std::size_t bufsz = vsnprintf (NULL , 0 , format, args_bufsz);
350
- va_end (args_bufsz);
351
-
352
- // Create an empty string of that size.
353
- std::string s (bufsz, 0 );
354
-
355
- // Now format the data into this string and return it.
356
- std::va_list args_format;
357
- va_copy (args_format, args);
358
- // The second parameter is the maximum number of bytes that vsnprintf
359
- // will write _including_ the terminating null byte.
360
- vsnprintf (&s[0 ], s.size () + 1 , format, args_format);
361
- va_end (args_format);
362
-
363
- return s;
364
- }
365
-
366
343
void interpreter::redirect_output ()
367
344
{
368
345
p_cout_strbuf = std::cout.rdbuf ();
You can’t perform that action at this time.
0 commit comments