MCPcopy Create free account
hub / github.com/GPUOpen-LibrariesAndSDKs/VulkanMemoryAllocator / PrintMessageV

Function PrintMessageV

src/Common.cpp:91–103  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

89static const size_t CONSOLE_SMALL_BUF_SIZE = 256;
90
91void PrintMessageV(CONSOLE_COLOR color, const char* format, va_list argList)
92{
93 size_t dstLen = (size_t)::_vscprintf(format, argList);
94 if(dstLen)
95 {
96 bool useSmallBuf = dstLen < CONSOLE_SMALL_BUF_SIZE;
97 char smallBuf[CONSOLE_SMALL_BUF_SIZE];
98 std::vector<char> bigBuf(useSmallBuf ? 0 : dstLen + 1);
99 char* bufPtr = useSmallBuf ? smallBuf : bigBuf.data();
100 ::vsprintf_s(bufPtr, dstLen + 1, format, argList);
101 PrintMessage(color, bufPtr);
102 }
103}
104
105void PrintMessageV(CONSOLE_COLOR color, const wchar_t* format, va_list argList)
106{

Callers 3

PrintMessageFFunction · 0.85
PrintWarningFFunction · 0.85
PrintErrorFFunction · 0.85

Calls 2

PrintMessageFunction · 0.85
dataMethod · 0.45

Tested by

no test coverage detected