libcsdbg  1.28
C++ exception (and generic) stack trace debug library
parser & csdbg::parser::remove_style ( const i8 nm)
virtual

Remove a style, indexed by name.

Parameters
[in]nmthe style name
Returns
*this

Definition at line 477 of file parser.cpp.

References __D_ASSERT, likely, m_styles, csdbg::style::name(), and unlikely.

478 {
479  __D_ASSERT(nm != NULL);
480  if ( unlikely(nm == NULL) )
481  return *this;
482 
483  for (u32 i = 0, sz = m_styles->size(); likely(i < sz); i++) {
484  style *stl = m_styles->at(i);
485  if ( unlikely(strcmp(stl->name(), nm) == 0) ) {
486  m_styles->remove(i);
487  break;
488  }
489  }
490 
491  return *this;
492 }
#define likely(expr)
Offer a hint (positive) to the pipeline branch predictor.
Definition: config.hpp:344
unsigned int u32
32-bit unsigned integer
Definition: config.hpp:102
#define unlikely(expr)
Offer a hint (negative) to the pipeline branch predictor.
Definition: config.hpp:349
#define __D_ASSERT(x)
Assertion macro.
Definition: config.hpp:268
chain< style > * m_styles
VT100 style collection.
Definition: parser.hpp:44

+ Here is the call graph for this function: