MCPcopy Create free account
hub / github.com/ZDoom/Raze / Printf

Method Printf

source/common/filesystem/source/files.cpp:492–504  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

490}
491
492size_t FileWriter::Printf(const char *fmt, ...)
493{
494 char c[300];
495 va_list arglist;
496 va_start(arglist, fmt);
497 auto n = vsnprintf(c, 300, fmt, arglist);
498 std::string buf;
499 buf.resize(n + 1);
500 va_start(arglist, fmt);
501 vsnprintf(&buf.front(), n + 1, fmt, arglist);
502 va_end(arglist);
503 return Write(buf.c_str(), strlen(buf.c_str())); // Make sure we write no nullptr bytes.
504}
505
506size_t BufferWriter::Write(const void *buffer, size_t len)
507{

Callers 4

SaveStatisticsFunction · 0.80
WriteCommentHeaderMethod · 0.80
WriteConfigFileMethod · 0.80
ExportEnvironmentsFunction · 0.80

Calls 2

c_strMethod · 0.80
resizeMethod · 0.45

Tested by

no test coverage detected