corrected warnings when compiling with -Wall -W

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@15430 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Gilles Depeyrot
2002-05-08 14:00:23 +00:00
parent 3475a005d6
commit f2af4afb82
8 changed files with 106 additions and 54 deletions

View File

@@ -92,14 +92,14 @@ class WXDLLEXPORT wxListKey
{
public:
// implicit ctors
wxListKey()
{ m_keyType = wxKEY_NONE; }
wxListKey(long i)
{ m_keyType = wxKEY_INTEGER; m_key.integer = i; }
wxListKey(const wxChar *s)
{ m_keyType = wxKEY_STRING; m_key.string = wxStrdup(s); }
wxListKey(const wxString& s)
{ m_keyType = wxKEY_STRING; m_key.string = wxStrdup(s.c_str()); }
wxListKey() : m_keyType(wxKEY_NONE)
{ }
wxListKey(long i) : m_keyType(wxKEY_INTEGER)
{ m_key.integer = i; }
wxListKey(const wxChar *s) : m_keyType(wxKEY_STRING)
{ m_key.string = wxStrdup(s); }
wxListKey(const wxString& s) : m_keyType(wxKEY_STRING)
{ m_key.string = wxStrdup(s.c_str()); }
// accessors
wxKeyType GetKeyType() const { return m_keyType; }
@@ -183,6 +183,8 @@ private:
*m_previous;
wxListBase *m_list; // list we belong to
DECLARE_NO_COPY_CLASS(wxNodeBase)
};
// -----------------------------------------------------------------------------
@@ -198,7 +200,8 @@ private:
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) { Init(keyType); }
wxListBase(wxKeyType keyType = wxKEY_NONE)
{ Init(keyType); }
virtual ~wxListBase();
// accessors
@@ -399,7 +402,7 @@ private:
: wxListBase(count, (void **)elements) { } \
\
name& operator=(const name& list) \
{ return (name&)wxListBase::operator=(list); } \
{ (void) wxListBase::operator=(list); return *this; } \
\
nodetype *GetFirst() const \
{ return (nodetype *)wxListBase::GetFirst(); } \
@@ -506,7 +509,7 @@ public:
~wxList() { }
wxList& operator=(const wxList& list)
{ return (wxList&)wxListBase::operator=(list); }
{ (void) wxListBase::operator=(list); return *this; }
// compatibility methods
void Sort(wxSortCompareFunction compfunc) { wxListBase::Sort(compfunc); }