From 5a8231ef46dfc249ae17c288841a282570309cfc Mon Sep 17 00:00:00 2001 From: =?utf8?q?W=C5=82odzimierz=20Skiba?= Date: Thu, 7 Apr 2005 12:36:39 +0000 Subject: [PATCH] VC++ 1.5 no more supported. git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@33408 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- include/wx/list.h | 8 +++++--- include/wx/string.h | 18 +++++++----------- 2 files changed, 12 insertions(+), 14 deletions(-) diff --git a/include/wx/list.h b/include/wx/list.h index 02805b9d03..82b0b0a3db 100644 --- a/include/wx/list.h +++ b/include/wx/list.h @@ -460,9 +460,7 @@ class WXDLLIMPEXP_BASE wxListBase : public wxObject { friend class WXDLLIMPEXP_BASE wxNodeBase; // should be able to call DetachNode() friend class wxHashTableBase; // should be able to call untyped Find() -private: - // common part of all ctors - void Init(wxKeyType keyType = wxKEY_NONE); // Must be declared before it's used (for VC++ 1.5) + public: // default ctor & dtor wxListBase(wxKeyType keyType = wxKEY_NONE) @@ -599,6 +597,10 @@ protected: void Reverse(); void DeleteNodes(wxNodeBase* first, wxNodeBase* last); private: + + // common part of all ctors + void Init(wxKeyType keyType = wxKEY_NONE); + // helpers // common part of copy ctor and assignment operator void DoCopy(const wxListBase& list); diff --git a/include/wx/string.h b/include/wx/string.h index fef44a0ca8..08d4544810 100644 --- a/include/wx/string.h +++ b/include/wx/string.h @@ -512,11 +512,8 @@ public: // find a substring size_t find(const wxStringBase& str, size_t nStart = 0) const; - // VC++ 1.5 can't cope with this syntax. -#if !defined(__VISUALC__) || defined(__WIN32__) // find first n characters of sz size_t find(const wxChar* sz, size_t nStart = 0, size_t n = npos) const; -#endif // VC++ 1.5 // find the first occurence of character ch after nStart size_t find(wxChar ch, size_t nStart = 0) const; @@ -526,7 +523,6 @@ public: // as find, but from the end size_t rfind(const wxStringBase& str, size_t nStart = npos) const; - // VC++ 1.5 can't cope with this syntax. // as find, but from the end size_t rfind(const wxChar* sz, size_t nStart = npos, size_t n = npos) const; @@ -700,7 +696,7 @@ public: { Truncate(0); - wxASSERT_MSG( IsEmpty(), _T("string not empty after call to Empty()?") ); + wxASSERT_MSG( empty(), _T("string not empty after call to Empty()?") ); } // empty the string and free memory void Clear() @@ -731,7 +727,7 @@ public: // get last character wxChar Last() const { - wxASSERT_MSG( !IsEmpty(), _T("wxString: index out of bounds") ); + wxASSERT_MSG( !empty(), _T("wxString: index out of bounds") ); return at(length() - 1); } @@ -739,7 +735,7 @@ public: // get writable last character wxChar& Last() { - wxASSERT_MSG( !IsEmpty(), _T("wxString: index out of bounds") ); + wxASSERT_MSG( !empty(), _T("wxString: index out of bounds") ); return at(length() - 1); } @@ -906,8 +902,8 @@ public: // string += C string wxString& Append(const wxString& s) { - // test for IsEmpty() to share the string if possible - if ( IsEmpty() ) + // test for empty() to share the string if possible + if ( empty() ) *this = s; else append(s); @@ -1127,8 +1123,8 @@ public: int Last( const wxChar ch ) const { return Find(ch, true); } bool Contains(const wxString& str) const { return Find(str) != wxNOT_FOUND; } - // use IsEmpty() - bool IsNull() const { return IsEmpty(); } + // use empty() + bool IsNull() const { return empty(); } // std::string compatibility functions -- 2.45.2