MCPcopy Create free account
hub / github.com/danoon2/Boxedwine / emplace_back

Method emplace_back

lib/sdl2/src/hidapi/android/hid.cpp:220–247  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

218 }
219
220 void emplace_back( const uint8_t *pData, size_t nSize )
221 {
222 hid_buffer_entry *pEntry;
223
224 if ( m_pFree )
225 {
226 pEntry = m_pFree;
227 m_pFree = m_pFree->m_pNext;
228 }
229 else
230 {
231 pEntry = new hid_buffer_entry;
232 }
233 pEntry->m_pNext = nullptr;
234
235 if ( m_pTail )
236 {
237 m_pTail->m_pNext = pEntry;
238 }
239 else
240 {
241 m_pHead = pEntry;
242 }
243 m_pTail = pEntry;
244
245 pEntry->m_buffer.assign( pData, nSize );
246 ++m_nSize;
247 }
248
249 void clear()
250 {

Callers 4

ProcessInputMethod · 0.80
openMethod · 0.80
async_readMethod · 0.80
mainFunction · 0.80

Calls 1

assignMethod · 0.45

Tested by 1

mainFunction · 0.64