// 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"
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
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;
}