X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/8de2e39c170b2036e36ab1d691b98b624a02048b..7482b22003c03f7aa3335aec271b5fcb48e2693d:/src/common/string.cpp diff --git a/src/common/string.cpp b/src/common/string.cpp index de7834e389..5329f085e2 100644 --- a/src/common/string.cpp +++ b/src/common/string.cpp @@ -41,6 +41,10 @@ #include #include +#ifdef __SALFORDC__ +#include +#endif + #if wxUSE_WCSRTOMBS #include // for wcsrtombs(), see comments where it's used #endif // GNU @@ -76,7 +80,7 @@ static const struct } g_strEmpty = { {-1, 0, 0}, '\0' }; // empty C style string: points to 'string data' byte of g_strEmpty -extern const char *g_szNul = &g_strEmpty.dummy; +extern const char WXDLLEXPORT *g_szNul = &g_strEmpty.dummy; // ---------------------------------------------------------------------------- // conditional compilation @@ -871,7 +875,7 @@ wxString& wxString::Trim(bool bFromRight) psz++; // fix up data and length - int nDataLength = GetStringData()->nDataLength - (psz - m_pchData); + int nDataLength = GetStringData()->nDataLength - (psz - (const char*) m_pchData); memmove(m_pchData, psz, (nDataLength + 1)*sizeof(char)); GetStringData()->nDataLength = nDataLength; } @@ -919,7 +923,7 @@ int wxString::Find(char ch, bool bFromEnd) const { const char *psz = bFromEnd ? strrchr(m_pchData, ch) : strchr(m_pchData, ch); - return (psz == NULL) ? wxNOT_FOUND : psz - m_pchData; + return (psz == NULL) ? wxNOT_FOUND : psz - (const char*) m_pchData; } // find a sub-string (like strstr) @@ -927,7 +931,7 @@ int wxString::Find(const char *pszSub) const { const char *psz = strstr(m_pchData, pszSub); - return (psz == NULL) ? wxNOT_FOUND : psz - m_pchData; + return (psz == NULL) ? wxNOT_FOUND : psz - (const char*) m_pchData; } // ---------------------------------------------------------------------------