X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/8db4a5d27a7ed301d395fce08e2c1618cd629696..333e57d578e9e0fb6555452b5a53698ffd85ee69:/include/wx/buffer.h diff --git a/include/wx/buffer.h b/include/wx/buffer.h index 6d50b2a0a9..3d7d6403f6 100644 --- a/include/wx/buffer.h +++ b/include/wx/buffer.h @@ -13,16 +13,11 @@ #define _WX_BUFFER_H #include "wx/chartype.h" -#include "wx/wxcrt.h" +#include "wx/wxcrtbase.h" #include // malloc() and free() -class WXDLLIMPEXP_BASE wxCStrData; - -inline char *wxStrDup(const char *s) { return wxStrdupA(s); } -#if wxUSE_WCHAR_T - inline wchar_t *wxStrDup(const wchar_t *ws) { return wxStrdupW(ws); } -#endif +class WXDLLIMPEXP_FWD_BASE wxCStrData; // ---------------------------------------------------------------------------- // Special classes for (wide) character strings: they use malloc/free instead @@ -36,7 +31,7 @@ public: typedef T CharType; wxCharTypeBuffer(const CharType *str = NULL) - : m_str(str ? wxStrDup(str) : NULL), + : m_str(str ? wxStrdup(str) : NULL), m_owned(true) { } @@ -103,7 +98,7 @@ public: { if ( m_owned ) free(m_str); - m_str = str ? wxStrDup(str) : NULL; + m_str = str ? wxStrdup(str) : NULL; m_owned = true; return *this; } @@ -155,7 +150,7 @@ private: bool m_owned; }; -class WXDLLIMPEXP_BASE wxCharBuffer : public wxCharTypeBuffer +class wxCharBuffer : public wxCharTypeBuffer { public: typedef wxCharTypeBuffer wxCharTypeBufferBase; @@ -170,7 +165,7 @@ public: }; #if wxUSE_WCHAR_T -class WXDLLIMPEXP_BASE wxWCharBuffer : public wxCharTypeBuffer +class wxWCharBuffer : public wxCharTypeBuffer { public: typedef wxCharTypeBuffer wxCharTypeBufferBase;