MCPcopy Create free account
hub / github.com/ARM-software/astc-encoder / trace_add_data

Function trace_add_data

Source/astcenc_diagnostic_trace.cpp:181–201  ·  view source on GitHub ↗

See header for documentation. */

Source from the content-addressed store, hash-verified

179
180/* See header for documentation. */
181void trace_add_data(
182 const char* key,
183 const char* format,
184 ...
185) {
186 constexpr size_t bufsz = 256;
187 char buffer[bufsz];
188
189 va_list args;
190 va_start (args, format);
191 vsnprintf (buffer, bufsz, format, args);
192 va_end (args);
193
194 // Guarantee there is a NUL terminator
195 buffer[bufsz - 1] = 0;
196
197 std::string value = "\"" + std::string(buffer) + "\"";
198
199 TraceNode* node = g_TraceLog->get_current_leaf();
200 node->add_attrib("str", key, value);
201}
202
203/* See header for documentation. */
204void trace_add_data(

Calls 3

get_current_leafMethod · 0.80
add_attribMethod · 0.80
maxFunction · 0.70

Tested by

no test coverage detected