X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/853d7d3dc9a1f7512a3b71c76b95048c3af6ab02..3c87527e89228b537800d06e1c32a62900417beb:/include/wx/buffer.h diff --git a/include/wx/buffer.h b/include/wx/buffer.h index a1547764c7..afc0776994 100644 --- a/include/wx/buffer.h +++ b/include/wx/buffer.h @@ -54,11 +54,13 @@ public: } operator const char *() const { return m_str; } + char operator[](size_t n) const { return m_str[n]; } private: char *m_str; }; +#if wxUSE_WCHAR_T class wxWCharBuffer { public: @@ -97,10 +99,12 @@ public: } operator const wchar_t *() const { return m_wcs; } - + wchar_t operator[](size_t n) const { return m_wcs[n]; } + private: wchar_t *m_wcs; }; +#endif #if wxUSE_UNICODE #define wxMB2WXbuf wxWCharBuffer