From c1df0a3b587f9b830783aeeaca514b3c0dff50e6 Mon Sep 17 00:00:00 2001 From: Vadim Zeitlin Date: Mon, 19 Mar 2007 00:06:17 +0000 Subject: [PATCH] add overloads of wxString and wxCStrData::operator[] taking long, for consistency with std::string classes git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@44908 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- include/wx/string.h | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/include/wx/string.h b/include/wx/string.h index 204e4be293..8485ea1aad 100644 --- a/include/wx/string.h +++ b/include/wx/string.h @@ -785,6 +785,7 @@ public: // allow expressions like "c_str()[0]": wxUniChar operator[](int n) const { return operator[](size_t(n)); } wxUniChar operator[](size_t n) const; + wxUniChar operator[](long n) const { return operator[](size_t(n)); } #ifndef wxSIZE_T_IS_UINT wxUniChar operator[](unsigned int n) const { return operator[](size_t(n)); } #endif // size_t != unsigned int @@ -1046,6 +1047,8 @@ public: */ wxUniChar operator[](int n) const { return wxStringBase::at(n); } + wxUniChar operator[](long n) const + { return wxStringBase::at(n); } wxUniChar operator[](size_t n) const { return wxStringBase::at(n); } #ifndef wxSIZE_T_IS_UINT @@ -1056,6 +1059,8 @@ public: // operator versions of GetWriteableChar() wxUniCharRef operator[](int n) { return wxStringBase::at(n); } + wxUniCharRef operator[](long n) + { return wxStringBase::at(n); } wxUniCharRef operator[](size_t n) { return wxStringBase::at(n); } #ifndef wxSIZE_T_IS_UINT -- 2.50.0