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

Method GetOrCreate

IDEHelper/DbgModule.cpp:2753–2763  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

2751
2752template <typename T>
2753T DbgModule::GetOrCreate(int idx, DbgDataMap& dataMap)
2754{
2755 if (idx == 0)
2756 return NULL;
2757 T val = dataMap.Get<T>(idx);
2758 if (val != NULL)
2759 return val;
2760 val = mAlloc.Alloc<typename RemoveTypePointer<T>::type >();
2761 dataMap.Set(idx, val);
2762 return val;
2763}
2764
2765template <typename T>
2766static T GetStackTop(DataStack* dataStack)

Callers

nothing calls this directly

Calls 1

SetMethod · 0.45

Tested by

no test coverage detected