X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/fb25206791c8324c946fb724f21c913b5f3b295e..c099b53353ec8c689681a1bc8f5117a584e4098d:/include/wx/stringimpl.h?ds=inline diff --git a/include/wx/stringimpl.h b/include/wx/stringimpl.h index 7a9adb99bf..00d24e2242 100644 --- a/include/wx/stringimpl.h +++ b/include/wx/stringimpl.h @@ -53,7 +53,18 @@ extern WXDLLIMPEXP_DATA_BASE(const wxStringCharType*) wxEmptyStringImpl; // deal with STL/non-STL/non-STL-but-wxUSE_STD_STRING // ---------------------------------------------------------------------------- -#define wxUSE_STL_BASED_WXSTRING wxUSE_STL +// using STL implies using std::string +#if wxUSE_STL + #undef wxUSE_STD_STRING + #define wxUSE_STD_STRING 1 +#endif + +// we use STL-based string internally if we use std::string at all now, there +// should be no reason to prefer our internal implement but if you really need +// it you can predefine wxUSE_STL_BASED_WXSTRING as 0 when building the library +#ifndef wxUSE_STL_BASED_WXSTRING + #define wxUSE_STL_BASED_WXSTRING wxUSE_STD_STRING +#endif // in both cases we need to define wxStdString #if wxUSE_STL_BASED_WXSTRING || wxUSE_STD_STRING @@ -371,9 +382,11 @@ public: // lib.string.access // return the character at position n + value_type operator[](size_type n) const { return m_pchData[n]; } value_type at(size_type n) const { wxASSERT_VALID_INDEX( n ); return m_pchData[n]; } // returns the writable character at position n + reference operator[](size_type n) { CopyBeforeWrite(); return m_pchData[n]; } reference at(size_type n) { wxASSERT_VALID_INDEX( n );