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

Method FindFunction

hlslparser/src/HLSLTree.cpp:82–97  ·  view source on GitHub ↗

@@ This doesn't do any parameter matching. Simply returns the first function with that name.

Source from the content-addressed store, hash-verified

80
81// @@ This doesn't do any parameter matching. Simply returns the first function with that name.
82HLSLFunction *HLSLTree::FindFunction(const char *name)
83{
84 HLSLStatement *statement = m_root->statement;
85 while (statement != NULL) {
86 if (statement->nodeType == HLSLNodeType_Function) {
87 HLSLFunction *function = (HLSLFunction *)statement;
88 if (String_Equal(name, function->name)) {
89 return function;
90 }
91 }
92
93 statement = statement->nextStatement;
94 }
95
96 return NULL;
97}
98
99HLSLDeclaration *HLSLTree::FindGlobalDeclaration(const char *name, HLSLBuffer **buffer_out /*=NULL*/)
100{

Callers 3

GenerateMethod · 0.45
GenerateMethod · 0.45
PruneTreeFunction · 0.45

Calls 1

String_EqualFunction · 0.85

Tested by

no test coverage detected