X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/936525578d838199cf0592e0f89f0a14550398c6..58ce18f2fdadecffb21e27555115af708325cf18:/include/wx/arrstr.h?ds=sidebyside diff --git a/include/wx/arrstr.h b/include/wx/arrstr.h index 3bc11f0655..f9e297dd33 100644 --- a/include/wx/arrstr.h +++ b/include/wx/arrstr.h @@ -1,5 +1,5 @@ /////////////////////////////////////////////////////////////////////////////// -// Name: include/wx/arrstr.h +// Name: wx/arrstr.h // Purpose: wxArrayString class // Author: Mattia Barbon and Vadim Zeitlin // Modified by: @@ -87,6 +87,17 @@ public: } int Index(const wxString& str, bool bCase = true, bool bFromEnd = false) const; + +private: + void Insert() + { + wxFAIL_MSG( "wxSortedArrayString::Insert() is not to be used" ); + } + + void Sort() + { + wxFAIL_MSG( "wxSortedArrayString::Sort() is not to be used" ); + } }; #else // if !wxUSE_STL @@ -97,7 +108,7 @@ public: // FIXME-VC6: currently it's only not defined for VC6 in DLL build as it // doesn't export template methods from DLL correctly so even though // it compiles them fine, we get link errors when using wxArrayString -#if !defined(__VISUALC6__) || !(defined(WXMAKINGDLL || defined(WXUSINGDLL))) +#if !defined(__VISUALC6__) || !(defined(WXMAKINGDLL) || defined(WXUSINGDLL)) #define wxHAS_VECTOR_TEMPLATE_ASSIGN #endif @@ -125,11 +136,11 @@ public: // // NB: the reason for using int and not bool is that like this we can avoid // using this ctor for implicit conversions from "const char *" (which - // we'd like to be implicitly converted to wxString instead!) - // - // of course, using explicit would be even better - if all compilers - // supported it... - wxArrayString(int autoSort) { Init(autoSort != 0); } + // we'd like to be implicitly converted to wxString instead!). This + // wouldn't be needed if the 'explicit' keyword was supported by all + // compilers, or if this was protected ctor for wxSortedArrayString, + // but we're stuck with it now. + wxEXPLICIT wxArrayString(int autoSort) { Init(autoSort != 0); } // C string array ctor wxArrayString(size_t sz, const char** a); wxArrayString(size_t sz, const wchar_t** a); @@ -165,7 +176,7 @@ public: wxString& Item(size_t nIndex) const { wxASSERT_MSG( nIndex < m_nCount, - _T("wxArrayString: index out of bounds") ); + wxT("wxArrayString: index out of bounds") ); return m_pItems[nIndex]; } @@ -176,7 +187,7 @@ public: wxString& Last() const { wxASSERT_MSG( !IsEmpty(), - _T("wxArrayString: index out of bounds") ); + wxT("wxArrayString: index out of bounds") ); return Item(GetCount() - 1); }