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

Fill with a printf-style format C-string expanded with the values of a variable argument list.

Parameters
[in]fmta printf-style format C-string
[in]...a variable argument list
Returns
*this
Exceptions
std::bad_alloc
csdbg::exception

Definition at line 271 of file string.cpp.

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

Referenced by csdbg::parser::on_lib_load(), and operator=().

272 {
273  __D_ASSERT(fmt != NULL);
274  if ( unlikely(fmt == NULL) )
275  return memalign(0);
276 
277  __D_ASSERT(fmt != m_data);
278  if ( unlikely(fmt == m_data) )
279  return *this;
280 
281  va_list args;
282  va_start(args, fmt);
283  return format(fmt, args);
284 }
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
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
#define __D_ASSERT(x)
Assertion macro.
Definition: config.hpp:268

+ Here is the call graph for this function:

+ Here is the caller graph for this function: