MCPcopy Create free account
hub / github.com/TorqueGameEngines/Torque3D / setMessage

Method setMessage

Engine/lib/openal-soft/core/except.cpp:17–27  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

15base_exception::~base_exception() { }
16
17void base_exception::setMessage(const char* msg, std::va_list args)
18{
19 std::va_list args2;
20 va_copy(args2, args);
21 int msglen{std::vsnprintf(nullptr, 0, msg, args)};
22 if LIKELY(msglen > 0)
23 {
24 mMessage.resize(static_cast<size_t>(msglen)+1);
25 std::vsnprintf(&mMessage[0], mMessage.length(), msg, args2);
26 mMessage.pop_back();
27 }
28 va_end(args2);
29}
30

Callers 1

onCreateMethod · 0.45

Calls 4

LIKELYFunction · 0.50
resizeMethod · 0.45
lengthMethod · 0.45
pop_backMethod · 0.45

Tested by

no test coverage detected