const wchar_t* AsWChar() const;
operator const wchar_t*() const { return AsWChar(); }
- inline operator bool() const;
-
#if !wxUSE_UNICODE
inline
#endif
operator const char*() const { return c_str(); }
operator const wchar_t*() const { return c_str(); }
+ // implicit conversion to untyped pointer for compatibility with previous
+ // wxWidgets versions: this is the same as conversion to const char * so it
+ // may fail!
+ operator const void*() const { return c_str(); }
+
// identical to c_str(), for MFC compatibility
const wxCStrData GetData() const { return c_str(); }
//
// get writable buffer of at least nLen bytes. Unget() *must* be called
// a.s.a.p. to put string back in a reasonable state!
- wxDEPRECATED( wxChar *GetWriteBuf(size_t nLen) );
+ wxDEPRECATED( wxStringCharType *GetWriteBuf(size_t nLen) );
// call this immediately after GetWriteBuf() has been used
wxDEPRECATED( void UngetWriteBuf() );
wxDEPRECATED( void UngetWriteBuf(size_t nLen) );
delete m_str;
}
-inline wxCStrData::operator bool() const
-{
- return !m_str->empty();
-}
-
// simple cases for AsChar() and AsWChar(), the complicated ones are
// in string.cpp
#if wxUSE_UNICODE_WCHAR