public:
// Ctor constructs the object from char literal; they are needed to make
// operator?: compile and they intentionally take char*, not const char*
- wxCStrData(char *buf);
- wxCStrData(wchar_t *buf);
+ inline wxCStrData(char *buf);
+ inline wxCStrData(wchar_t *buf);
+ inline wxCStrData(const wxCStrData& data);
inline ~wxCStrData();
inline wxCStrData::wxCStrData(wchar_t *buf)
: m_str(new wxString(buf)), m_offset(0), m_owned(true) {}
+inline wxCStrData::wxCStrData(const wxCStrData& data)
+ : m_str(data.m_owned ? new wxString(*data.m_str) : data.m_str),
+ m_offset(data.m_offset),
+ m_owned(data.m_owned)
+{
+}
+
inline wxCStrData::~wxCStrData()
{
if ( m_owned )
{
}
+#if WXWIN_COMPATIBILITY_2_8
+ // lot of code out there doesn't explicitly include wx/wxchar.h, but uses
+ // CRT wrappers that are now declared in wx/wxcrt.h and wx/wxcrtvararg.h,
+ // so let's include this header now that wxString is defined and it's safe
+ // to do it:
+ #include "wx/wxchar.h"
+#endif
+
#endif // _WX_WXSTRING_H_