MCPcopy Create free account
hub / github.com/bulletphysics/bullet3 / push_back

Method push_back

src/LinearMath/btAlignedObjectArray.h:257–272  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

255 }
256
257 SIMD_FORCE_INLINE void push_back(const T& _Val)
258 {
259 const int sz = size();
260 if (sz == capacity())
261 {
262 reserve(allocSize(size()));
263 }
264
265#ifdef BT_USE_PLACEMENT_NEW
266 new (&m_data[m_size]) T(_Val);
267#else
268 m_data[size()] = _Val;
269#endif //BT_USE_PLACEMENT_NEW
270
271 m_size++;
272 }
273
274 /// return the pre-allocated (reserved) elements, this is at least as large as the total number of elements,see size() and reserve()
275 SIMD_FORCE_INLINE int capacity() const

Callers 15

testAddMethod · 0.45
testMinusMethod · 0.45
testDotMethod · 0.45
testMultiplyMethod · 0.45
GrahamScanConvexHull2DFunction · 0.45
initDNAMethod · 0.45
allocateMethod · 0.45
finalizeChunkMethod · 0.45
shrinkMethod · 0.45
shiftFaceMethod · 0.45
getVertexCopyFunction · 0.45
computeMethod · 0.45

Calls 2

reserveFunction · 0.85
sizeFunction · 0.50

Tested by

no test coverage detected