default ctor should create an empty/uninitialized buffer, not one with a single character string
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@38494 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
parent
1fce4e9668
commit
fedde9b906
@ -25,12 +25,12 @@
|
|||||||
class WXDLLIMPEXP_BASE classname \
|
class WXDLLIMPEXP_BASE classname \
|
||||||
{ \
|
{ \
|
||||||
public: \
|
public: \
|
||||||
classname(const chartype *str) \
|
classname(const chartype *str = NULL) \
|
||||||
: m_str(str ? strdupfunc(str) : NULL) \
|
: m_str(str ? strdupfunc(str) : NULL) \
|
||||||
{ \
|
{ \
|
||||||
} \
|
} \
|
||||||
\
|
\
|
||||||
classname(size_t len=0) \
|
classname(size_t len) \
|
||||||
: m_str((chartype *)malloc((len + 1)*sizeof(chartype))) \
|
: m_str((chartype *)malloc((len + 1)*sizeof(chartype))) \
|
||||||
{ \
|
{ \
|
||||||
m_str[len] = (chartype)0; \
|
m_str[len] = (chartype)0; \
|
||||||
|
Loading…
Reference in New Issue
Block a user