[ 1216436 ] cleanup 'shadow variable' warnings from gcc in headers.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@34597 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -296,15 +296,15 @@ public: \
|
|||||||
int Index(T e, bool bFromEnd = false) const \
|
int Index(T e, bool bFromEnd = false) const \
|
||||||
{ return base::Index(e, bFromEnd); } \
|
{ return base::Index(e, bFromEnd); } \
|
||||||
\
|
\
|
||||||
void Add(T Item, size_t nInsert = 1) \
|
void Add(T lItem, size_t nInsert = 1) \
|
||||||
{ insert(end(), nInsert, Item); } \
|
{ insert(end(), nInsert, lItem); } \
|
||||||
void Insert(T Item, size_t uiIndex, size_t nInsert = 1) \
|
void Insert(T lItem, size_t uiIndex, size_t nInsert = 1) \
|
||||||
{ insert(begin() + uiIndex, nInsert, Item); } \
|
{ insert(begin() + uiIndex, nInsert, lItem); } \
|
||||||
\
|
\
|
||||||
void RemoveAt(size_t uiIndex, size_t nRemove = 1) \
|
void RemoveAt(size_t uiIndex, size_t nRemove = 1) \
|
||||||
{ base::RemoveAt(uiIndex, nRemove); } \
|
{ base::RemoveAt(uiIndex, nRemove); } \
|
||||||
void Remove(T Item) \
|
void Remove(T lItem) \
|
||||||
{ int iIndex = Index(Item); \
|
{ int iIndex = Index(lItem); \
|
||||||
wxCHECK2_MSG( iIndex != wxNOT_FOUND, return, \
|
wxCHECK2_MSG( iIndex != wxNOT_FOUND, return, \
|
||||||
_WX_ERROR_REMOVE); \
|
_WX_ERROR_REMOVE); \
|
||||||
RemoveAt((size_t)iIndex); } \
|
RemoveAt((size_t)iIndex); } \
|
||||||
@@ -342,18 +342,18 @@ public: \
|
|||||||
T& Last() const \
|
T& Last() const \
|
||||||
{ return (T&)(base::operator[](Count() - 1)); } \
|
{ return (T&)(base::operator[](Count() - 1)); } \
|
||||||
\
|
\
|
||||||
int Index(T Item, bool bFromEnd = false) const \
|
int Index(T lItem, bool bFromEnd = false) const \
|
||||||
{ return base::Index((base_type)Item, bFromEnd); } \
|
{ return base::Index((base_type)lItem, bFromEnd); } \
|
||||||
\
|
\
|
||||||
void Add(T Item, size_t nInsert = 1) \
|
void Add(T lItem, size_t nInsert = 1) \
|
||||||
{ base::Add((base_type)Item, nInsert); } \
|
{ base::Add((base_type)lItem, nInsert); } \
|
||||||
void Insert(T Item, size_t uiIndex, size_t nInsert = 1) \
|
void Insert(T lItem, size_t uiIndex, size_t nInsert = 1) \
|
||||||
{ base::Insert((base_type)Item, uiIndex, nInsert) ; } \
|
{ base::Insert((base_type)lItem, uiIndex, nInsert) ; } \
|
||||||
\
|
\
|
||||||
void RemoveAt(size_t uiIndex, size_t nRemove = 1) \
|
void RemoveAt(size_t uiIndex, size_t nRemove = 1) \
|
||||||
{ base::RemoveAt(uiIndex, nRemove); } \
|
{ base::RemoveAt(uiIndex, nRemove); } \
|
||||||
void Remove(T Item) \
|
void Remove(T lItem) \
|
||||||
{ int iIndex = Index(Item); \
|
{ int iIndex = Index(lItem); \
|
||||||
wxCHECK2_MSG( iIndex != wxNOT_FOUND, return, \
|
wxCHECK2_MSG( iIndex != wxNOT_FOUND, return, \
|
||||||
_WX_ERROR_REMOVE); \
|
_WX_ERROR_REMOVE); \
|
||||||
base::RemoveAt((size_t)iIndex); } \
|
base::RemoveAt((size_t)iIndex); } \
|
||||||
@@ -518,22 +518,22 @@ public: \
|
|||||||
T& Last() const \
|
T& Last() const \
|
||||||
{ return (T&)(base::operator[](size() - 1)); } \
|
{ return (T&)(base::operator[](size() - 1)); } \
|
||||||
\
|
\
|
||||||
int Index(T Item) const \
|
int Index(T lItem) const \
|
||||||
{ return base::Index(Item, (CMPFUNC)m_fnCompare); } \
|
{ return base::Index(lItem, (CMPFUNC)m_fnCompare); } \
|
||||||
\
|
\
|
||||||
size_t IndexForInsert(T Item) const \
|
size_t IndexForInsert(T lItem) const \
|
||||||
{ return base::IndexForInsert(Item, (CMPFUNC)m_fnCompare); } \
|
{ return base::IndexForInsert(lItem, (CMPFUNC)m_fnCompare); } \
|
||||||
\
|
\
|
||||||
void AddAt(T item, size_t index) \
|
void AddAt(T item, size_t index) \
|
||||||
{ base::insert(begin() + index, item); } \
|
{ base::insert(begin() + index, item); } \
|
||||||
\
|
\
|
||||||
size_t Add(T Item) \
|
size_t Add(T lItem) \
|
||||||
{ return base::Add(Item, (CMPFUNC)m_fnCompare); } \
|
{ return base::Add(lItem, (CMPFUNC)m_fnCompare); } \
|
||||||
\
|
\
|
||||||
void RemoveAt(size_t uiIndex, size_t nRemove = 1) \
|
void RemoveAt(size_t uiIndex, size_t nRemove = 1) \
|
||||||
{ base::erase(begin() + uiIndex, begin() + uiIndex + nRemove); } \
|
{ base::erase(begin() + uiIndex, begin() + uiIndex + nRemove); } \
|
||||||
void Remove(T Item) \
|
void Remove(T lItem) \
|
||||||
{ int iIndex = Index(Item); \
|
{ int iIndex = Index(lItem); \
|
||||||
wxCHECK2_MSG( iIndex != wxNOT_FOUND, return, \
|
wxCHECK2_MSG( iIndex != wxNOT_FOUND, return, \
|
||||||
_WX_ERROR_REMOVE ); \
|
_WX_ERROR_REMOVE ); \
|
||||||
base::erase(begin() + iIndex); } \
|
base::erase(begin() + iIndex); } \
|
||||||
@@ -575,17 +575,17 @@ public: \
|
|||||||
T& Last() const \
|
T& Last() const \
|
||||||
{ return *(T*)(base::operator[](size() - 1)); } \
|
{ return *(T*)(base::operator[](size() - 1)); } \
|
||||||
\
|
\
|
||||||
int Index(const T& Item, bool bFromEnd = false) const; \
|
int Index(const T& lItem, bool bFromEnd = false) const; \
|
||||||
\
|
\
|
||||||
void Add(const T& Item, size_t nInsert = 1); \
|
void Add(const T& lItem, size_t nInsert = 1); \
|
||||||
void Add(const T* pItem) \
|
void Add(const T* pItem) \
|
||||||
{ base::push_back((T*)pItem); } \
|
{ base::push_back((T*)pItem); } \
|
||||||
void push_back(const T* pItem) \
|
void push_back(const T* pItem) \
|
||||||
{ base::push_back((T*)pItem); } \
|
{ base::push_back((T*)pItem); } \
|
||||||
void push_back(const T& Item) \
|
void push_back(const T& lItem) \
|
||||||
{ Add(Item); } \
|
{ Add(lItem); } \
|
||||||
\
|
\
|
||||||
void Insert(const T& Item, size_t uiIndex, size_t nInsert = 1); \
|
void Insert(const T& lItem, size_t uiIndex, size_t nInsert = 1); \
|
||||||
void Insert(const T* pItem, size_t uiIndex) \
|
void Insert(const T* pItem, size_t uiIndex) \
|
||||||
{ base::insert(begin() + uiIndex, (T*)pItem); } \
|
{ base::insert(begin() + uiIndex, (T*)pItem); } \
|
||||||
\
|
\
|
||||||
|
@@ -44,7 +44,7 @@ public:
|
|||||||
// open specified file (may fail, use IsOpened())
|
// open specified file (may fail, use IsOpened())
|
||||||
wxFFile(const wxChar *filename, const wxChar *mode = _T("r"));
|
wxFFile(const wxChar *filename, const wxChar *mode = _T("r"));
|
||||||
// attach to (already opened) file
|
// attach to (already opened) file
|
||||||
wxFFile(FILE *fp) { m_fp = fp; }
|
wxFFile(FILE *lfp) { m_fp = lfp; }
|
||||||
|
|
||||||
// open/close
|
// open/close
|
||||||
// open a file (existing or not - the mode controls what happens)
|
// open a file (existing or not - the mode controls what happens)
|
||||||
@@ -53,8 +53,8 @@ public:
|
|||||||
bool Close();
|
bool Close();
|
||||||
|
|
||||||
// assign an existing file descriptor and get it back from wxFFile object
|
// assign an existing file descriptor and get it back from wxFFile object
|
||||||
void Attach(FILE *fp, const wxString& name = wxEmptyString)
|
void Attach(FILE *lfp, const wxString& name = wxEmptyString)
|
||||||
{ Close(); m_fp = fp; m_name = name; }
|
{ Close(); m_fp = lfp; m_name = name; }
|
||||||
void Detach() { m_fp = NULL; }
|
void Detach() { m_fp = NULL; }
|
||||||
FILE *fp() const { return m_fp; }
|
FILE *fp() const { return m_fp; }
|
||||||
|
|
||||||
|
@@ -79,7 +79,7 @@ public:
|
|||||||
// open specified file (may fail, use IsOpened())
|
// open specified file (may fail, use IsOpened())
|
||||||
wxFile(const wxChar *szFileName, OpenMode mode = read);
|
wxFile(const wxChar *szFileName, OpenMode mode = read);
|
||||||
// attach to (already opened) file
|
// attach to (already opened) file
|
||||||
wxFile(int fd) { m_fd = fd; m_error = false; }
|
wxFile(int lfd) { m_fd = lfd; m_error = false; }
|
||||||
|
|
||||||
// open/close
|
// open/close
|
||||||
// create a new file (with the default value of bOverwrite, it will fail if
|
// create a new file (with the default value of bOverwrite, it will fail if
|
||||||
@@ -91,7 +91,7 @@ public:
|
|||||||
bool Close(); // Close is a NOP if not opened
|
bool Close(); // Close is a NOP if not opened
|
||||||
|
|
||||||
// assign an existing file descriptor and get it back from wxFile object
|
// assign an existing file descriptor and get it back from wxFile object
|
||||||
void Attach(int fd) { Close(); m_fd = fd; m_error = false; }
|
void Attach(int lfd) { Close(); m_fd = lfd; m_error = false; }
|
||||||
void Detach() { m_fd = fd_invalid; }
|
void Detach() { m_fd = fd_invalid; }
|
||||||
int fd() const { return m_fd; }
|
int fd() const { return m_fd; }
|
||||||
|
|
||||||
|
@@ -355,32 +355,32 @@ public:
|
|||||||
// key and value are the same
|
// key and value are the same
|
||||||
void Put(long value, wxObject *object)
|
void Put(long value, wxObject *object)
|
||||||
{ DoPut( value, value, object ); }
|
{ DoPut( value, value, object ); }
|
||||||
void Put(long hash, long value, wxObject *object)
|
void Put(long lhash, long value, wxObject *object)
|
||||||
{ DoPut( value, hash, object ); }
|
{ DoPut( value, lhash, object ); }
|
||||||
void Put(const wxChar *value, wxObject *object)
|
void Put(const wxChar *value, wxObject *object)
|
||||||
{ DoPut( value, MakeKey( value ), object ); }
|
{ DoPut( value, MakeKey( value ), object ); }
|
||||||
void Put(long hash, const wxChar *value, wxObject *object)
|
void Put(long lhash, const wxChar *value, wxObject *object)
|
||||||
{ DoPut( value, hash, object ); }
|
{ DoPut( value, lhash, object ); }
|
||||||
|
|
||||||
// key and value are the same
|
// key and value are the same
|
||||||
wxObject *Get(long value) const
|
wxObject *Get(long value) const
|
||||||
{ return (wxObject*)DoGet( value, value ); }
|
{ return (wxObject*)DoGet( value, value ); }
|
||||||
wxObject *Get(long hash, long value) const
|
wxObject *Get(long lhash, long value) const
|
||||||
{ return (wxObject*)DoGet( value, hash ); }
|
{ return (wxObject*)DoGet( value, lhash ); }
|
||||||
wxObject *Get(const wxChar *value) const
|
wxObject *Get(const wxChar *value) const
|
||||||
{ return (wxObject*)DoGet( value, MakeKey( value ) ); }
|
{ return (wxObject*)DoGet( value, MakeKey( value ) ); }
|
||||||
wxObject *Get(long hash, const wxChar *value) const
|
wxObject *Get(long lhash, const wxChar *value) const
|
||||||
{ return (wxObject*)DoGet( value, hash ); }
|
{ return (wxObject*)DoGet( value, lhash ); }
|
||||||
|
|
||||||
// Deletes entry and returns data if found
|
// Deletes entry and returns data if found
|
||||||
wxObject *Delete(long key)
|
wxObject *Delete(long key)
|
||||||
{ return (wxObject*)DoDelete( key, key ); }
|
{ return (wxObject*)DoDelete( key, key ); }
|
||||||
wxObject *Delete(long hash, long key)
|
wxObject *Delete(long lhash, long key)
|
||||||
{ return (wxObject*)DoDelete( key, hash ); }
|
{ return (wxObject*)DoDelete( key, lhash ); }
|
||||||
wxObject *Delete(const wxChar *key)
|
wxObject *Delete(const wxChar *key)
|
||||||
{ return (wxObject*)DoDelete( key, MakeKey( key ) ); }
|
{ return (wxObject*)DoDelete( key, MakeKey( key ) ); }
|
||||||
wxObject *Delete(long hash, const wxChar *key)
|
wxObject *Delete(long lhash, const wxChar *key)
|
||||||
{ return (wxObject*)DoDelete( key, hash ); }
|
{ return (wxObject*)DoDelete( key, lhash ); }
|
||||||
|
|
||||||
// Construct your own integer key from a string, e.g. in case
|
// Construct your own integer key from a string, e.g. in case
|
||||||
// you need to combine it with something
|
// you need to combine it with something
|
||||||
@@ -521,14 +521,14 @@ private:
|
|||||||
virtual ~hashclass() { Destroy(); } \
|
virtual ~hashclass() { Destroy(); } \
|
||||||
\
|
\
|
||||||
void Put(long key, eltype *data) { DoPut(key, key, (void*)data); } \
|
void Put(long key, eltype *data) { DoPut(key, key, (void*)data); } \
|
||||||
void Put(long hash, long key, eltype *data) \
|
void Put(long lhash, long key, eltype *data) \
|
||||||
{ DoPut(key, hash, (void*)data); } \
|
{ DoPut(key, lhash, (void*)data); } \
|
||||||
eltype *Get(long key) const { return (eltype*)DoGet(key, key); } \
|
eltype *Get(long key) const { return (eltype*)DoGet(key, key); } \
|
||||||
eltype *Get(long hash, long key) const \
|
eltype *Get(long lhash, long key) const \
|
||||||
{ return (eltype*)DoGet(key, hash); } \
|
{ return (eltype*)DoGet(key, lhash); } \
|
||||||
eltype *Delete(long key) { return (eltype*)DoDelete(key, key); } \
|
eltype *Delete(long key) { return (eltype*)DoDelete(key, key); } \
|
||||||
eltype *Delete(long hash, long key) \
|
eltype *Delete(long lhash, long key) \
|
||||||
{ return (eltype*)DoDelete(key, hash); } \
|
{ return (eltype*)DoDelete(key, lhash); } \
|
||||||
protected: \
|
protected: \
|
||||||
virtual void DoDeleteContents( wxHashTableBase_Node* node ) \
|
virtual void DoDeleteContents( wxHashTableBase_Node* node ) \
|
||||||
{ delete (eltype*)node->GetData(); } \
|
{ delete (eltype*)node->GetData(); } \
|
||||||
|
Reference in New Issue
Block a user