MCPcopy Create free account
hub / github.com/davisking/dlib / pop

Method pop

dlib/stack/stack_kernel_1.h:316–332  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

314 typename mem_manager
315 >
316 void stack_kernel_1<T,mem_manager>::
317 pop(
318 T& item
319 )
320 {
321 node* old_node = top;
322 top = top->next;
323
324 // swap the item from the stack into item
325 exchange(old_node->item,item);
326
327 // free the memory
328 pool.deallocate(old_node);
329 --stack_size;
330
331 reset();
332 }
333
334// ----------------------------------------------------------------------------------------
335// ----------------------------------------------------------------------------------------

Callers

nothing calls this directly

Calls 3

exchangeFunction · 0.85
resetFunction · 0.85
deallocateMethod · 0.45

Tested by

no test coverage detected