MCPcopy Create free account
hub / github.com/SakuraEngine/SakuraEngine / PushFront

Method PushFront

modules/engine/graphics/src/d3d12/D3D12MemAlloc.cpp:2336–2355  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

2334
2335template<typename T>
2336typename List<T>::Item* List<T>::PushFront()
2337{
2338 Item* const pNewItem = m_ItemAllocator.Alloc();
2339 pNewItem->pPrev = NULL;
2340 if(IsEmpty())
2341 {
2342 pNewItem->pNext = NULL;
2343 m_pFront = pNewItem;
2344 m_pBack = pNewItem;
2345 m_Count = 1;
2346 }
2347 else
2348 {
2349 pNewItem->pNext = m_pFront;
2350 m_pFront->pPrev = pNewItem;
2351 m_pFront = pNewItem;
2352 ++m_Count;
2353 }
2354 return pNewItem;
2355}
2356
2357template<typename T>
2358typename List<T>::Item* List<T>::PushBack(const T& value)

Callers

nothing calls this directly

Calls 2

IsEmptyFunction · 0.50
AllocMethod · 0.45

Tested by

no test coverage detected