compatibiltiy functions should be inline, we don't want to take space hit for using them nor speed hit for the user code!

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@22120 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Vadim Zeitlin 2003-07-19 19:56:46 +00:00
parent 6de4403884
commit 137b730319
2 changed files with 21 additions and 18 deletions

View File

@ -990,6 +990,27 @@ private:
#ifdef wxLIST_COMPATIBILITY
// inline compatibility functions
// -----------------------------------------------------------------------------
// wxNodeBase deprecated methods
// -----------------------------------------------------------------------------
inline wxNode *wxNodeBase::Next() const { return (wxNode *)GetNext(); }
inline wxNode *wxNodeBase::Previous() const { return (wxNode *)GetPrevious(); }
inline wxObject *wxNodeBase::Data() const { return (wxObject *)GetData(); }
// -----------------------------------------------------------------------------
// wxListBase deprecated methods
// -----------------------------------------------------------------------------
inline int wxListBase::Number() const { return (int)GetCount(); }
inline wxNode *wxListBase::First() const { return (wxNode *)GetFirst(); }
inline wxNode *wxListBase::Last() const { return (wxNode *)GetLast(); }
inline wxNode *wxListBase::Nth(size_t n) const { return (wxNode *)Item(n); }
inline wxListBase::operator wxList&() const { return *(wxList*)this; }
// define this to make a lot of noise about use of the old wxList classes.
//#define wxWARN_COMPAT_LIST_USE

View File

@ -574,24 +574,6 @@ void wxListBase::DeleteNodes(wxNodeBase* first, wxNodeBase* last)
#ifdef wxLIST_COMPATIBILITY
// -----------------------------------------------------------------------------
// wxNodeBase deprecated methods
// -----------------------------------------------------------------------------
wxNode *wxNodeBase::Next() const { return (wxNode *)GetNext(); }
wxNode *wxNodeBase::Previous() const { return (wxNode *)GetPrevious(); }
wxObject *wxNodeBase::Data() const { return (wxObject *)GetData(); }
// -----------------------------------------------------------------------------
// wxListBase deprecated methods
// -----------------------------------------------------------------------------
int wxListBase::Number() const { return GetCount(); }
wxNode *wxListBase::First() const { return (wxNode *)GetFirst(); }
wxNode *wxListBase::Last() const { return (wxNode *)GetLast(); }
wxNode *wxListBase::Nth(size_t n) const { return (wxNode *)Item(n); }
wxListBase::operator wxList&() const { return *(wxList*)this; }
// -----------------------------------------------------------------------------
// wxList (a.k.a. wxObjectList)
// -----------------------------------------------------------------------------