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

Function SortProgramNodes

shadercompiler/ParserUtils.cpp:937–951  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

935}
936
937void SortProgramNodes( ASTNode* root )
938{
939 if( !root )
940 {
941 return;
942 }
943 std::stable_sort(
944 root->GetChildren().begin(),
945 root->GetChildren().end(),
946 []( ASTNode* a, ASTNode* b ) -> bool {
947 auto pA = GetNodeOrder( a );
948 auto pB = GetNodeOrder( b );
949 return pA < pB;
950 } );
951}
952
953void CreateGlobalsCB( ParserState& state )
954{

Callers 2

CompileEffectMethod · 0.85
CreateGlobalsCBFunction · 0.85

Calls 3

GetNodeOrderFunction · 0.85
beginMethod · 0.45
endMethod · 0.45

Tested by

no test coverage detected