MCPcopy Create free account
hub / github.com/alecazam/kram / AddString

Method AddString

hlslparser/src/Engine.cpp:276–292  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

274}
275
276const char* StringPool::AddString(const char* text)
277{
278 auto* impl = CastImpl(m_impl);
279 auto it = impl->find(text);
280 if (it != impl->end())
281 return *it;
282
283 // _strdup doesn't go through allocator either
284#if _MSC_VER
285 const char* dup = _strdup(text);
286#else
287 const char* dup = strdup(text);
288#endif
289
290 impl->insert(dup);
291 return dup;
292}
293
294const char* StringPool::PrintFormattedVaList(const char* fmt, va_list args)
295{

Callers 8

AddIntrinsicFunction · 0.45
RegisterMatrixFunction · 0.45
RegisterVectorFunction · 0.45
RegisterScalarFunction · 0.45
AcceptIdentifierMethod · 0.45
ParseCommentMethod · 0.45
AcceptTypeMethod · 0.45
GetFileNameMethod · 0.45

Calls 3

findMethod · 0.45
endMethod · 0.45
insertMethod · 0.45

Tested by

no test coverage detected