MCPcopy Create free account
hub / github.com/carbonengine/trinity / AllocateName

Method AllocateName

shadercompiler/ParserState.cpp:862–874  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

860}
861
862InlineString ParserState::AllocateName()
863{
864 const char* format = "_new_symbol_%04i";
865 size_t len = strlen( format ) + 1;
866 char* newName = new char[len];
867#if _WIN32
868 sprintf_s( newName, len, format, m_strings.size() );
869#else
870 snprintf( newName, len, format, m_strings.size() );
871#endif
872 m_strings.push_back( newName );
873 return MakeInlineString( newName, newName + len - 1 );
874}
875
876InlineString ParserState::AllocateName( const char* name )
877{

Callers 11

PatchShaderFunction · 0.80
PatchShaderFunction · 0.80
PatchRtShaderFunction · 0.80
CreateGlobalInputsStructFunction · 0.80
NewStructFunction · 0.80
NewLiteralConstFunction · 0.80
NewVarDeclarationFunction · 0.80
NewFunctionParameterFunction · 0.80
FindTextureToSamplerFunction · 0.80
FindDX9TexSampleCallsFunction · 0.80

Calls 2

MakeInlineStringFunction · 0.85
sizeMethod · 0.80

Tested by

no test coverage detected