MCPcopy Create free account
hub / github.com/beefytech/Beef / GetLastDoubleColon

Function GetLastDoubleColon

IDEHelper/COFF.cpp:90–115  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

88#define REGISTER_PRIMITIVE() mTypeMap.Insert(dbgType)
89
90static const char* GetLastDoubleColon(const char* name)
91{
92 int templateDepth = 0;
93 int parenDepth = 0;
94 const char* lastDblColon = NULL;
95 for (const char* checkPtr = name; *checkPtr != '\0'; checkPtr++)
96 {
97 char c = checkPtr[0];
98 if (c == '<')
99 templateDepth++;
100 else if (c == '>')
101 templateDepth--;
102 else if (c == '(')
103 parenDepth++;
104 else if (c == ')')
105 parenDepth--;
106 if ((templateDepth == 0) && (parenDepth == 0) && (c == ':') && (checkPtr[1] == ':'))
107 lastDblColon = checkPtr;
108 if ((templateDepth == 0) && (parenDepth == 0) && (c == ' '))
109 {
110 // This catches cases like "Beefy::BfMethodRef::operator Beefy::BfMethodInstance*", where we want to match the :: right before "operator"
111 break;
112 }
113 }
114 return lastDblColon;
115}
116
117static const char* GetNamespaceEnd(const char* name)
118{

Callers 3

CvGetTypeOrNamespaceMethod · 0.85
MapCompileUnitMethodsMethod · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected