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

Method Next

IDEHelper/Compiler/BfExprEvaluator.cpp:142–170  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

140}
141
142BfBaseClassWalker::Entry BfBaseClassWalker::Next()
143{
144 if (!mManualList.IsEmpty())
145 {
146 auto entry = mManualList.back();
147 mManualList.pop_back();
148 return entry;
149 }
150
151 // Check the most specific type instance first (highest inheritance level)
152 auto checkInstance = mTypes[0];
153 if (mTypes[0] == NULL)
154 checkInstance = mTypes[1];
155 else if ((mTypes[1] != NULL) && (mTypes[1]->mInheritDepth > mTypes[0]->mInheritDepth))
156 checkInstance = mTypes[1];
157 if (checkInstance == NULL)
158 return Entry();
159
160 // Do it this was so if we reach the same base class for both types that we only handle each base type once
161 if (checkInstance == mTypes[0])
162 mTypes[0] = checkInstance->mBaseType;
163 if (checkInstance == mTypes[1])
164 mTypes[1] = checkInstance->mBaseType;
165
166 Entry entry;
167 entry.mSrcType = checkInstance;
168 entry.mTypeInstance = checkInstance;
169 return entry;
170}
171
172//////////////////////////////////////////////////////////////////////////
173

Calls 4

EntryClass · 0.70
IsEmptyMethod · 0.45
backMethod · 0.45
pop_backMethod · 0.45

Tested by

no test coverage detected