X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/9d155f504e4e39b5cba44729185506805867f9fd..0fe5619d258bf80948047e7ff78611311d1e154d:/src/common/string.cpp diff --git a/src/common/string.cpp b/src/common/string.cpp index b1349cf731..d0297f3c97 100644 --- a/src/common/string.cpp +++ b/src/common/string.cpp @@ -1904,7 +1904,7 @@ wxString& wxString::replace(size_t nStart, size_t nLen, #define STRING(p) ((wxString *)(&(p))) // ctor -wxArrayString::wxArrayString(bool autoSort) +void wxArrayString::Init(bool autoSort) { m_nSize = m_nCount = 0; @@ -1915,10 +1915,7 @@ wxArrayString::wxArrayString(bool autoSort) // copy ctor wxArrayString::wxArrayString(const wxArrayString& src) { - m_nSize = - m_nCount = 0; - m_pItems = (wxChar **) NULL; - m_autoSort = src.m_autoSort; + Init(src.m_autoSort); *this = src; } @@ -2240,7 +2237,8 @@ static wxArrayString::CompareFunction gs_compareFunction = NULL; static bool gs_sortAscending = TRUE; // function which is called by quick sort -static int LINKAGEMODE wxStringCompareFunction(const void *first, const void *second) +extern "C" int LINKAGEMODE +wxStringCompareFunction(const void *first, const void *second) { wxString *strFirst = (wxString *)first; wxString *strSecond = (wxString *)second;