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 @@ -339,29 +339,6 @@ __get_cxx_version ()
339339 restore_output ();
340340 }
341341
342- static std::string c_format (const char * format, std::va_list args)
343- {
344- // Call vsnprintf once to determine the required buffer length. The
345- // return value is the number of characters _excluding_ the null byte.
346- std::va_list args_bufsz;
347- va_copy (args_bufsz, args);
348- std::size_t bufsz = vsnprintf (NULL , 0 , format, args_bufsz);
349- va_end (args_bufsz);
350-
351- // Create an empty string of that size.
352- std::string s (bufsz, 0 );
353-
354- // Now format the data into this string and return it.
355- std::va_list args_format;
356- va_copy (args_format, args);
357- // The second parameter is the maximum number of bytes that vsnprintf
358- // will write _including_ the terminating null byte.
359- vsnprintf (&s[0 ], s.size () + 1 , format, args_format);
360- va_end (args_format);
361-
362- return s;
363- }
364-
365342 void interpreter::redirect_output ()
366343 {
367344 p_cout_strbuf = std::cout.rdbuf ();
You can’t perform that action at this time.
0 commit comments