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

Method Copy

shadercompiler/ASTNode.cpp:33–50  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

31}
32
33ASTNode* ASTNode::Copy() const
34{
35 ASTNode* result = new ASTNode( m_nodeType, m_location, m_scope, &m_token );
36 result->m_symbol = m_symbol;
37 result->m_type = m_type;
38 for( auto it = m_children.begin(); it != m_children.end(); ++it )
39 {
40 if( *it )
41 {
42 result->m_children.push_back( ( *it )->Copy() );
43 }
44 else
45 {
46 result->m_children.push_back( nullptr );
47 }
48 }
49 return result;
50}
51
52void ASTNode::AddChild( ASTNode* child )
53{

Callers 13

GatherFieldsFunction · 0.80
GatherSystemFieldsFunction · 0.80
PatchVposFunction · 0.80
PatchShaderFunction · 0.80
PatchRtShaderFunction · 0.80
GetGlobalInputDataFunction · 0.80
PatchMatrixRowsFunction · 0.80
CreateGlobalInputsStructFunction · 0.80
FindDX9TexSampleCallsFunction · 0.80
SplitCoordVecFunction · 0.80
PatchMetalTextureCallFunction · 0.80

Calls 2

beginMethod · 0.45
endMethod · 0.45

Tested by

no test coverage detected