X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/11fe6505b848a968f4c89cb3c3fd37a6a03bcaea..0bd2681966523df88ad5cf8e505b532843e58d74:/src/common/utilscmn.cpp diff --git a/src/common/utilscmn.cpp b/src/common/utilscmn.cpp index 471aa86569..2183825135 100644 --- a/src/common/utilscmn.cpp +++ b/src/common/utilscmn.cpp @@ -731,9 +731,9 @@ typedef struct /* The next 4 #defines implement a very fast in-line stack abstraction. */ #define STACK_SIZE (8 * sizeof(unsigned long int)) -#define PUSH(low, high) ((void) ((top->lo = (low)), (top->hi = (high)), ++top)) -#define POP(low, high) ((void) (--top, (low = top->lo), (high = top->hi))) -#define STACK_NOT_EMPTY (stack < top) +#define PUSH(low, high) ((void) ((top->lo = (low)), (top->hi = (high)), ++top)) +#define POP(low, high) ((void) (--top, (low = top->lo), (high = top->hi))) +#define STACK_NOT_EMPTY (stack < top) /* Order size using quicksort. This implementation incorporates @@ -870,12 +870,12 @@ void wxQsort(void *const pbase, size_t total_elems, of the array to sort, and END_PTR points at the very last element in the array (*not* one beyond it!). */ -#define min(x, y) ((x) < (y) ? (x) : (y)) - { char *const end_ptr = &base_ptr[size * (total_elems - 1)]; char *tmp_ptr = base_ptr; - char *thresh = min(end_ptr, base_ptr + max_thresh); + char *thresh = base_ptr + max_thresh; + if ( thresh > end_ptr ) + thresh = end_ptr; register char *run_ptr; /* Find smallest element in first threshold and place it at the @@ -1153,7 +1153,7 @@ bool wxLaunchDefaultBrowser(const wxString& urlOrig, int flags) wxChar *wxStripMenuCodes(const wxChar *in, wxChar *out) { #if wxUSE_MENUS - wxString s = wxMenuItem::GetLabelFromText(in); + wxString s = wxMenuItem::GetLabelText(in); #else wxString str(in); wxString s = wxStripMenuCodes(str);