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

Remove a dictionary, indexed by name.

Parameters
[in]nmthe dictionary name
Returns
*this

Definition at line 338 of file parser.cpp.

References __D_ASSERT, likely, m_dictionaries, csdbg::dictionary::name(), and unlikely.

339 {
340  __D_ASSERT(nm != NULL);
341  if ( unlikely(nm == NULL) )
342  return *this;
343 
344  for (u32 i = 0, sz = m_dictionaries->size(); likely(i < sz); i++) {
345  dictionary *dict = m_dictionaries->at(i);
346  if ( unlikely(strcmp(dict->name(), nm) == 0) ) {
347  m_dictionaries->remove(i);
348  break;
349  }
350  }
351 
352  return *this;
353 }
chain< dictionary > * m_dictionaries
Dictionary collection.
Definition: parser.hpp:42
#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

+ Here is the call graph for this function: