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
This commit is contained in:
		@@ -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
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user