X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/2af7511ea7ecae3f5c1b783756750216e2f97d0e..60104cbafa4502c7592801ccb8507f779c5601cf:/src/common/regex.cpp?ds=sidebyside diff --git a/src/common/regex.cpp b/src/common/regex.cpp index 896d2ad248..1b58da4000 100644 --- a/src/common/regex.cpp +++ b/src/common/regex.cpp @@ -18,10 +18,6 @@ // headers // ---------------------------------------------------------------------------- -#if defined(__GNUG__) && !defined(NO_GCC_PRAGMA) - #pragma implementation "regex.h" -#endif - // For compilers that support precompilation, includes "wx.h". #include "wx/wxprec.h" @@ -296,7 +292,7 @@ bool wxRegExImpl::Matches(const wxChar *str, int flags) const return true; default: - // an error occured + // an error occurred wxLogError(_("Failed to match '%s' in regular expression: %s"), str, GetErrorMsg(rc, !conv).c_str()); // fall through @@ -316,10 +312,11 @@ bool wxRegExImpl::GetMatch(size_t *start, size_t *len, size_t index) const const regmatch_t& match = m_Matches[index]; + // we need the casts because rm_so can be a 64 bit quantity if ( start ) - *start = match.rm_so; + *start = wx_truncate_cast(size_t, match.rm_so); if ( len ) - *len = match.rm_eo - match.rm_so; + *len = wx_truncate_cast(size_t, match.rm_eo - match.rm_so); return true; }