fixes for gcc 3.x -Wshadow warnings
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_4_BRANCH@17550 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -62,9 +62,9 @@ protected:
|
|||||||
_wxHashTable_NodeBase** dstTable,
|
_wxHashTable_NodeBase** dstTable,
|
||||||
BucketFromNode func, ProcessNode proc );
|
BucketFromNode func, ProcessNode proc );
|
||||||
|
|
||||||
static void** AllocTable( size_t size )
|
static void** AllocTable( size_t sz )
|
||||||
{
|
{
|
||||||
return (void **)calloc(size, sizeof(void*));
|
return (void **)calloc(sz, sizeof(void*));
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
@@ -172,10 +172,10 @@ public: \
|
|||||||
const_pointer operator ->() const { return &(m_node->m_value); } \
|
const_pointer operator ->() const { return &(m_node->m_value); } \
|
||||||
}; \
|
}; \
|
||||||
\
|
\
|
||||||
CLASSNAME( size_type size = 10, const hasher& hfun = hasher(), \
|
CLASSNAME( size_type sz = 10, const hasher& hfun = hasher(), \
|
||||||
const key_equal& k_eq = key_equal(), \
|
const key_equal& k_eq = key_equal(), \
|
||||||
const key_extractor& k_ex = key_extractor() ) \
|
const key_extractor& k_ex = key_extractor() ) \
|
||||||
: m_tableBuckets( GetNextPrime( size ) ), \
|
: m_tableBuckets( GetNextPrime( sz ) ), \
|
||||||
m_items( 0 ), \
|
m_items( 0 ), \
|
||||||
m_hasher( hfun ), \
|
m_hasher( hfun ), \
|
||||||
m_equals( k_eq ), \
|
m_equals( k_eq ), \
|
||||||
|
@@ -235,7 +235,7 @@ public:
|
|||||||
int Number() const { return GetCount(); }
|
int Number() const { return GetCount(); }
|
||||||
wxNode *First() const { return (wxNode *)GetFirst(); }
|
wxNode *First() const { return (wxNode *)GetFirst(); }
|
||||||
wxNode *Last() const { return (wxNode *)GetLast(); }
|
wxNode *Last() const { return (wxNode *)GetLast(); }
|
||||||
wxNode *Nth(size_t index) const { return (wxNode *)Item(index); }
|
wxNode *Nth(size_t n) const { return (wxNode *)Item(n); }
|
||||||
#endif // wxLIST_COMPATIBILITY
|
#endif // wxLIST_COMPATIBILITY
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
@@ -274,8 +274,12 @@ protected:
|
|||||||
wxNodeBase *Item(size_t index) const;
|
wxNodeBase *Item(size_t index) const;
|
||||||
|
|
||||||
// get the list item's data
|
// get the list item's data
|
||||||
void *operator[](size_t index) const
|
void *operator[](size_t n) const
|
||||||
{ wxNodeBase *node = Item(index); return node ? node->GetData() : (wxNodeBase*)NULL; }
|
{
|
||||||
|
wxNodeBase *node = Item(n);
|
||||||
|
|
||||||
|
return node ? node->GetData() : (wxNodeBase *)NULL;
|
||||||
|
}
|
||||||
|
|
||||||
// operations
|
// operations
|
||||||
// append to end of list
|
// append to end of list
|
||||||
|
Reference in New Issue
Block a user