added extend() method which realloc()s the buffer
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@38495 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -84,6 +84,18 @@ public: \
|
||||
return *this; \
|
||||
} \
|
||||
\
|
||||
bool extend(size_t len) \
|
||||
{ \
|
||||
chartype * \
|
||||
str = (chartype *)realloc(m_str, (len + 1)*sizeof(chartype)); \
|
||||
if ( !str ) \
|
||||
return false; \
|
||||
\
|
||||
m_str = str; \
|
||||
\
|
||||
return true; \
|
||||
} \
|
||||
\
|
||||
chartype *data() { return m_str; } \
|
||||
const chartype *data() const { return m_str; } \
|
||||
operator const chartype *() const { return m_str; } \
|
||||
|
Reference in New Issue
Block a user