MCPcopy Create free account
hub / github.com/CobaltFusion/DebugViewPP / InsertAt

Method InsertAt

Libraries/TabbingFramework/CustomTabCtrl.h:682–698  ·  view source on GitHub ↗

Real CAtlArray: void InsertAt( size_t iElement, INARGTYPE element, size_t nCount = 1 );

Source from the content-addressed store, hash-verified

680
681 //Real CAtlArray: void InsertAt( size_t iElement, INARGTYPE element, size_t nCount = 1 );
682 void InsertAt( size_t nIndex, E& element )
683 {
684 if(m_nSize == m_nAllocSize)
685 {
686 E* aT;
687 int nNewAllocSize = (m_nAllocSize == 0) ? 1 : (m_nSize * 2);
688 aT = (E*)realloc(m_aT, nNewAllocSize * sizeof(E));
689 if(aT == NULL)
690 return; // FALSE;
691 m_nAllocSize = nNewAllocSize;
692 m_aT = aT;
693 }
694 memmove((void*)&m_aT[nIndex+1], (void*)&m_aT[nIndex], (m_nSize - nIndex ) * sizeof(E));
695 m_nSize++;
696 SetAtIndex(nIndex, element);
697 //return TRUE;
698 }
699
700 //Real CAtlArray: void RemoveAt( size_t iElement, size_t nCount = 1 );
701 void RemoveAt( size_t nIndex )

Callers 2

InsertItemFunction · 0.80
MoveItemFunction · 0.80

Calls

no outgoing calls

Tested by

no test coverage detected