]> git.saurik.com Git - wxWidgets.git/commitdiff
add overloads of wxString and wxCStrData::operator[] taking long, for consistency...
authorVadim Zeitlin <vadim@wxwidgets.org>
Mon, 19 Mar 2007 00:06:17 +0000 (00:06 +0000)
committerVadim Zeitlin <vadim@wxwidgets.org>
Mon, 19 Mar 2007 00:06:17 +0000 (00:06 +0000)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@44908 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

include/wx/string.h

index 204e4be293dca55301b732104cfb5d36a70fd2a5..8485ea1aad703e1b596f4655aca5b11a74c51ad3 100644 (file)
@@ -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;
     // 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
 #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[](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
     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); }
     // 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
     wxUniCharRef operator[](size_t n)
       { return wxStringBase::at(n); }
 #ifndef wxSIZE_T_IS_UINT