add GetChars()

This commit is contained in:
dickelbeck 2009-04-17 06:23:07 +00:00
parent 3339f54f50
commit 0350744a7d
1 changed files with 16 additions and 0 deletions

View File

@ -14,6 +14,22 @@
#endif #endif
/**
* Function GetChars
* returns a pointer to the actual character data, either 8 or
* 16 bits wide, depending on how the wxWidgets library was compiled.
* Pointer
*/
const wxChar* GetChars( wxString s )
{
#if wxCHECK_VERSION(2,9,0)
return (const wxChar*) s.wx_str();
#else
return s.GetData();
#endif
}
#ifndef MIN #ifndef MIN
#define MIN( x, y ) ( (x) > (y) ? (y) : (x) ) #define MIN( x, y ) ( (x) > (y) ? (y) : (x) )
#endif #endif