]> git.saurik.com Git - wxWidgets.git/blobdiff - src/common/regex.cpp
re-renamed DoCreate() to XmDoCreateTLW() to avoid virtual function hiding in other...
[wxWidgets.git] / src / common / regex.cpp
index 6f7d454e7723dbbfc9141a36ac6841e4a77225c7..1b58da4000608c87d2fc78c0733c78fab2dd6015 100644 (file)
 // 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"
 
@@ -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;
 }