libcsdbg  1.28
C++ exception (and generic) stack trace debug library
csdbg::string::string ( const i8 fmt,

Object constructor.

[in]fmta printf-style format C-string
[in]...a variable argument list
This constructor is also an implicit type conversion operator between i8* and csdbg::string

Definition at line 150 of file string.cpp.

References __D_ASSERT, format(), memalign(), and unlikely.

150  :
151 m_data(NULL),
152 m_length(0),
153 m_size(0)
154 {
155  __D_ASSERT(fmt != NULL);
156  if ( unlikely(fmt == NULL) )
157  memalign(0);
159  else {
160  va_list args;
161  va_start(args, fmt);
162  format(fmt, args);
163  }
164 }
virtual string & format(const i8 *, va_list)
Fill with a printf-style format C-string expanded with the values of a variable argument list...
Definition: string.cpp:79
virtual string & memalign(u32, bool=false)
Allocate aligned memory, mandate a minimum buffer size.
Definition: string.cpp:26
u32 m_size
Buffer size.
Definition: string.hpp:46
i8 * m_data
String data.
Definition: string.hpp:42
#define unlikely(expr)
Offer a hint (negative) to the pipeline branch predictor.
Definition: config.hpp:349
u32 m_length
Character count.
Definition: string.hpp:44
#define __D_ASSERT(x)
Assertion macro.
Definition: config.hpp:268

+ Here is the call graph for this function: