MCPcopy Create free account
hub / github.com/HaxeFoundation/hxcpp / push

Method push

include/hx/QuickVec.h:164–176  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

162 delete mTail;
163 }
164 inline void push(T inObj)
165 {
166 if (mHeadPos<1024)
167 {
168 mHead->mElems[mHeadPos++] = inObj;
169 return;
170 }
171 if (mHead != mTail)
172 mActive.push(mHead);
173 mHead = mSpare.empty() ? new Slab : mSpare.pop();
174 mHead->mElems[0] = inObj;
175 mHeadPos = 1;
176 }
177 inline bool some_left() { return mHead!=mTail || mHeadPos!=mTailPos; }
178 inline T pop()
179 {

Callers

nothing calls this directly

Calls 3

emptyMethod · 0.80
pushMethod · 0.45
popMethod · 0.45

Tested by

no test coverage detected