[ 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:
Włodzimierz Skiba
2005-06-08 15:17:42 +00:00
parent 91af089567
commit 222702b112
4 changed files with 50 additions and 50 deletions

View File

@@ -296,15 +296,15 @@ public: \
int Index(T e, bool bFromEnd = false) const \
{ return base::Index(e, bFromEnd); } \
\
void Add(T Item, size_t nInsert = 1) \
{ insert(end(), nInsert, Item); } \
void Insert(T Item, size_t uiIndex, size_t nInsert = 1) \
{ insert(begin() + uiIndex, nInsert, Item); } \
void Add(T lItem, size_t nInsert = 1) \
{ insert(end(), nInsert, lItem); } \
void Insert(T lItem, size_t uiIndex, size_t nInsert = 1) \
{ insert(begin() + uiIndex, nInsert, lItem); } \
\
void RemoveAt(size_t uiIndex, size_t nRemove = 1) \
{ base::RemoveAt(uiIndex, nRemove); } \
void Remove(T Item) \
{ int iIndex = Index(Item); \
void Remove(T lItem) \
{ int iIndex = Index(lItem); \
wxCHECK2_MSG( iIndex != wxNOT_FOUND, return, \
_WX_ERROR_REMOVE); \
RemoveAt((size_t)iIndex); } \
@@ -342,18 +342,18 @@ public: \
T& Last() const \
{ return (T&)(base::operator[](Count() - 1)); } \
\
int Index(T Item, bool bFromEnd = false) const \
{ return base::Index((base_type)Item, bFromEnd); } \
int Index(T lItem, bool bFromEnd = false) const \
{ return base::Index((base_type)lItem, bFromEnd); } \
\
void Add(T Item, size_t nInsert = 1) \
{ base::Add((base_type)Item, nInsert); } \
void Insert(T Item, size_t uiIndex, size_t nInsert = 1) \
{ base::Insert((base_type)Item, uiIndex, nInsert) ; } \
void Add(T lItem, size_t nInsert = 1) \
{ base::Add((base_type)lItem, nInsert); } \
void Insert(T lItem, size_t uiIndex, size_t nInsert = 1) \
{ base::Insert((base_type)lItem, uiIndex, nInsert) ; } \
\
void RemoveAt(size_t uiIndex, size_t nRemove = 1) \
{ base::RemoveAt(uiIndex, nRemove); } \
void Remove(T Item) \
{ int iIndex = Index(Item); \
void Remove(T lItem) \
{ int iIndex = Index(lItem); \
wxCHECK2_MSG( iIndex != wxNOT_FOUND, return, \
_WX_ERROR_REMOVE); \
base::RemoveAt((size_t)iIndex); } \
@@ -518,22 +518,22 @@ public: \
T& Last() const \
{ return (T&)(base::operator[](size() - 1)); } \
\
int Index(T Item) const \
{ return base::Index(Item, (CMPFUNC)m_fnCompare); } \
int Index(T lItem) const \
{ return base::Index(lItem, (CMPFUNC)m_fnCompare); } \
\
size_t IndexForInsert(T Item) const \
{ return base::IndexForInsert(Item, (CMPFUNC)m_fnCompare); } \
size_t IndexForInsert(T lItem) const \
{ return base::IndexForInsert(lItem, (CMPFUNC)m_fnCompare); } \
\
void AddAt(T item, size_t index) \
{ base::insert(begin() + index, item); } \
\
size_t Add(T Item) \
{ return base::Add(Item, (CMPFUNC)m_fnCompare); } \
size_t Add(T lItem) \
{ return base::Add(lItem, (CMPFUNC)m_fnCompare); } \
\
void RemoveAt(size_t uiIndex, size_t nRemove = 1) \
{ base::erase(begin() + uiIndex, begin() + uiIndex + nRemove); } \
void Remove(T Item) \
{ int iIndex = Index(Item); \
void Remove(T lItem) \
{ int iIndex = Index(lItem); \
wxCHECK2_MSG( iIndex != wxNOT_FOUND, return, \
_WX_ERROR_REMOVE ); \
base::erase(begin() + iIndex); } \
@@ -575,17 +575,17 @@ public: \
T& Last() const \
{ 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) \
{ base::push_back((T*)pItem); } \
void push_back(const T* pItem) \
{ base::push_back((T*)pItem); } \
void push_back(const T& Item) \
{ Add(Item); } \
void push_back(const T& lItem) \
{ 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) \
{ base::insert(begin() + uiIndex, (T*)pItem); } \
\

View File

@@ -44,7 +44,7 @@ public:
// open specified file (may fail, use IsOpened())
wxFFile(const wxChar *filename, const wxChar *mode = _T("r"));
// attach to (already opened) file
wxFFile(FILE *fp) { m_fp = fp; }
wxFFile(FILE *lfp) { m_fp = lfp; }
// open/close
// open a file (existing or not - the mode controls what happens)
@@ -53,8 +53,8 @@ public:
bool Close();
// assign an existing file descriptor and get it back from wxFFile object
void Attach(FILE *fp, const wxString& name = wxEmptyString)
{ Close(); m_fp = fp; m_name = name; }
void Attach(FILE *lfp, const wxString& name = wxEmptyString)
{ Close(); m_fp = lfp; m_name = name; }
void Detach() { m_fp = NULL; }
FILE *fp() const { return m_fp; }

View File

@@ -79,7 +79,7 @@ public:
// open specified file (may fail, use IsOpened())
wxFile(const wxChar *szFileName, OpenMode mode = read);
// 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
// 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
// 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; }
int fd() const { return m_fd; }

View File

@@ -355,32 +355,32 @@ public:
// key and value are the same
void Put(long value, wxObject *object)
{ DoPut( value, value, object ); }
void Put(long hash, long value, wxObject *object)
{ DoPut( value, hash, object ); }
void Put(long lhash, long value, wxObject *object)
{ DoPut( value, lhash, object ); }
void Put(const wxChar *value, wxObject *object)
{ DoPut( value, MakeKey( value ), object ); }
void Put(long hash, const wxChar *value, wxObject *object)
{ DoPut( value, hash, object ); }
void Put(long lhash, const wxChar *value, wxObject *object)
{ DoPut( value, lhash, object ); }
// key and value are the same
wxObject *Get(long value) const
{ return (wxObject*)DoGet( value, value ); }
wxObject *Get(long hash, long value) const
{ return (wxObject*)DoGet( value, hash ); }
wxObject *Get(long lhash, long value) const
{ return (wxObject*)DoGet( value, lhash ); }
wxObject *Get(const wxChar *value) const
{ return (wxObject*)DoGet( value, MakeKey( value ) ); }
wxObject *Get(long hash, const wxChar *value) const
{ return (wxObject*)DoGet( value, hash ); }
wxObject *Get(long lhash, const wxChar *value) const
{ return (wxObject*)DoGet( value, lhash ); }
// Deletes entry and returns data if found
wxObject *Delete(long key)
{ return (wxObject*)DoDelete( key, key ); }
wxObject *Delete(long hash, long key)
{ return (wxObject*)DoDelete( key, hash ); }
wxObject *Delete(long lhash, long key)
{ return (wxObject*)DoDelete( key, lhash ); }
wxObject *Delete(const wxChar *key)
{ return (wxObject*)DoDelete( key, MakeKey( key ) ); }
wxObject *Delete(long hash, const wxChar *key)
{ return (wxObject*)DoDelete( key, hash ); }
wxObject *Delete(long lhash, const wxChar *key)
{ return (wxObject*)DoDelete( key, lhash ); }
// Construct your own integer key from a string, e.g. in case
// you need to combine it with something
@@ -521,14 +521,14 @@ private:
virtual ~hashclass() { Destroy(); } \
\
void Put(long key, eltype *data) { DoPut(key, key, (void*)data); } \
void Put(long hash, long key, eltype *data) \
{ DoPut(key, hash, (void*)data); } \
void Put(long lhash, long key, eltype *data) \
{ DoPut(key, lhash, (void*)data); } \
eltype *Get(long key) const { return (eltype*)DoGet(key, key); } \
eltype *Get(long hash, long key) const \
{ return (eltype*)DoGet(key, hash); } \
eltype *Get(long lhash, long key) const \
{ return (eltype*)DoGet(key, lhash); } \
eltype *Delete(long key) { return (eltype*)DoDelete(key, key); } \
eltype *Delete(long hash, long key) \
{ return (eltype*)DoDelete(key, hash); } \
eltype *Delete(long lhash, long key) \
{ return (eltype*)DoDelete(key, lhash); } \
protected: \
virtual void DoDeleteContents( wxHashTableBase_Node* node ) \
{ delete (eltype*)node->GetData(); } \