libcsdbg  1.28
C++ exception (and generic) stack trace debug library
template<class T >
stack< T > & csdbg::stack< T >::pop ( )
virtual

Remove the top stack node.

Returns
*this

Definition at line 290 of file stack.hpp.

References __D_ASSERT, likely, and csdbg::node< T >::m_link.

291 {
292  __D_ASSERT(m_size > 0);
293  if ( likely(m_size != 0) ) {
294  node<T> *n = m_top;
295  m_top = m_top->m_link;
296  m_size--;
297  delete n;
298  }
299 
300  return *this;
301 }
#define likely(expr)
Offer a hint (positive) to the pipeline branch predictor.
Definition: config.hpp:344
u32 m_size
Node count.
Definition: stack.hpp:36
node< T > * m_top
Stack top.
Definition: stack.hpp:34
#define __D_ASSERT(x)
Assertion macro.
Definition: config.hpp:268