1. NOT_FOUND -> wxNOT_FOUND

2. wxString::Left(), Right(), Before(), After() clean up
3. wxLocale updates


git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@1406 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Vadim Zeitlin
1999-01-14 14:33:56 +00:00
parent afcaf277af
commit 3c67202dee
19 changed files with 482 additions and 595 deletions

View File

@@ -99,7 +99,7 @@ int name::Index(const T& Item, bool bFromEnd) const \
} \
} \
\
return NOT_FOUND; \
return wxNOT_FOUND; \
}
// redefine the macro so that now it will generate the class implementation

View File

@@ -195,7 +195,7 @@ class WXDLLEXPORT wxEvent;
/** symbolic constant used by all Find()-like functions returning positive
integer on success as failure indicator */
#define NOT_FOUND (-1)
#define wxNOT_FOUND (-1)
// ----------------------------------------------------------------------------
// Error codes

View File

@@ -123,8 +123,8 @@ protected:
/**
Search the element in the array, starting from the either side
@param bFromEnd if TRUE, start from the end
@return index of the first item matched or NOT_FOUND
@see NOT_FOUND
@return index of the first item matched or wxNOT_FOUND
@see wxNOT_FOUND
*/
int Index(long lItem, bool bFromEnd = FALSE) const;
/// search for an item using binary search in a sorted array
@@ -193,7 +193,7 @@ public: \
void Remove(size_t uiIndex) { wxBaseArray::Remove(uiIndex); } \
void Remove(T Item) \
{ int iIndex = Index(Item); \
wxCHECK2_MSG( iIndex != NOT_FOUND, return, \
wxCHECK2_MSG( iIndex != wxNOT_FOUND, return, \
"removing inexisting element in wxArray::Remove" ); \
wxBaseArray::Remove((size_t)iIndex); } \
\
@@ -246,7 +246,7 @@ public: \
void Remove(size_t uiIndex) { wxBaseArray::Remove(uiIndex); } \
void Remove(T Item) \
{ int iIndex = Index(Item); \
wxCHECK2_MSG( iIndex != NOT_FOUND, return, \
wxCHECK2_MSG( iIndex != wxNOT_FOUND, return, \
"removing inexisting element in wxArray::Remove" ); \
wxBaseArray::Remove((size_t)iIndex); } \
\

View File

@@ -327,7 +327,7 @@ public:
// create new entry/subgroup returning pointer to newly created element
ConfigGroup *AddSubgroup(const wxString& strName);
ConfigEntry *AddEntry (const wxString& strName, int nLine = NOT_FOUND);
ConfigEntry *AddEntry (const wxString& strName, int nLine = wxNOT_FOUND);
// will also recursively set parent's dirty flag
void SetDirty();

View File

@@ -103,8 +103,9 @@ WXDLLEXPORT char* wxExpandPath(char *dest, const char *path);
// Contract w.r.t environment (</usr/openwin/lib, OPENWHOME> -> ${OPENWINHOME}/lib)
// and make (if under the home tree) relative to home
// [caller must copy-- volatile]
WXDLLEXPORT char* wxContractPath (const wxString& filename,
const wxString& envname = wxEmptyString, const wxString& user = wxEmptyString);
WXDLLEXPORT char* wxContractPath(const wxString& filename,
const wxString& envname = "",
const wxString& user = "");
// Destructive removal of /./ and /../ stuff
WXDLLEXPORT char* wxRealPath(char *path);

View File

@@ -165,7 +165,7 @@ protected:
void *GetData() const { return m_data; }
void SetData(void *data) { m_data = data; }
// get 0-based index of this node within the list or NOT_FOUND
// get 0-based index of this node within the list or wxNOT_FOUND
int IndexOf() const;
virtual void DeleteData() { }
@@ -276,7 +276,7 @@ protected:
// by key
wxNodeBase *Find(const wxListKey& key) const;
// get 0-based index of object or NOT_FOUND
// get 0-based index of object or wxNOT_FOUND
int IndexOf( void *object ) const;
// this function allows the sorting of arbitrary lists by giving

View File

@@ -78,7 +78,7 @@ public:
virtual wxString GetHelpString(int id) const ;
// find item
// Finds the item id matching the given string, NOT_FOUND if not found.
// Finds the item id matching the given string, wxNOT_FOUND if not found.
virtual int FindItem(const wxString& itemString) const ;
// Find wxMenuItem by ID, and item's menu too if itemMenu is !NULL.
wxMenuItem *FindItemForId(int itemId, wxMenu **itemMenu = NULL) const;

File diff suppressed because it is too large Load Diff