MCPcopy Create free account
hub / github.com/ZDoom/Raze / FindFunction

Function FindFunction

source/common/scripting/core/imports.cpp:79–102  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

77//==========================================================================
78
79AFuncDesc *FindFunction(PContainerType *cls, const char * string)
80{
81 int min = 0, max = AFTable.Size() - 1;
82
83 while (min <= max)
84 {
85 int mid = (min + max) / 2;
86 int lexval = CompareClassNames(cls->TypeName.GetChars(), AFTable[mid]);
87 if (lexval == 0) lexval = stricmp(string, AFTable[mid].FuncName);
88 if (lexval == 0)
89 {
90 return &AFTable[mid];
91 }
92 else if (lexval > 0)
93 {
94 min = mid + 1;
95 }
96 else
97 {
98 max = mid - 1;
99 }
100 }
101 return nullptr;
102}
103
104//==========================================================================
105//

Callers 6

ParseBreakWallMethod · 0.85
ParseBreakCeilingMethod · 0.85
LookupFunctionFunction · 0.85
serializer.cppFile · 0.85
CompileFunctionMethod · 0.85
CreateOverrideFunctionFunction · 0.85

Calls 4

CompareClassNamesFunction · 0.85
stricmpFunction · 0.85
SizeMethod · 0.45
GetCharsMethod · 0.45

Tested by

no test coverage detected