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

Function AllocFromMap

IDEHelper/Compiler/BfCompiler.cpp:262–272  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

260
261template <typename TDict, typename TElement>
262static typename TDict::value_type AllocFromMap(TDict& dict, TElement* elem)
263{
264 typename TDict::value_type* valuePtr;
265 if (dict.TryAdd(elem, NULL, &valuePtr))
266 {
267 auto val = new typename std::remove_pointer<typename TDict::value_type>::type(elem);
268 val->mRefCount++;
269 *valuePtr = val;
270 }
271 return *valuePtr;
272}
273
274void BfCompiler::HotData::ClearUnused(bool isHotCompile)
275{

Callers 6

GetThisTypeMethod · 0.85
GetAllocationMethod · 0.85
GetFunctionReferenceMethod · 0.85
GetInnerMethodMethod · 0.85
GetVirtualDeclarationMethod · 0.85

Calls 1

TryAddMethod · 0.45

Tested by

no test coverage detected