X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/6d50049a5c4a04f10df683482b51e10c2d65ef84..e0954e729dabaad5603d9970d123d6b96ed73463:/src/common/regex.cpp diff --git a/src/common/regex.cpp b/src/common/regex.cpp index 7217296d2f..33458574c9 100644 --- a/src/common/regex.cpp +++ b/src/common/regex.cpp @@ -634,21 +634,12 @@ bool wxRegEx::Compile(const wxString& expr, int flags) return true; } -bool wxRegEx::Matches(const wxChar *str, int flags, size_t len) const +bool wxRegEx::Matches(const wxString& str, int flags) const { wxCHECK_MSG( IsValid(), false, _T("must successfully Compile() first") ); - (void)len; - return m_impl->Matches(WXREGEX_CHAR(str), flags WXREGEX_IF_NEED_LEN(len)); -} - -bool wxRegEx::Matches(const wxChar *str, int flags) const -{ - wxCHECK_MSG( IsValid(), false, _T("must successfully Compile() first") ); - - return m_impl->Matches(WXREGEX_CHAR(str), - flags - WXREGEX_IF_NEED_LEN(wxStrlen(str))); + return m_impl->Matches(WXREGEX_CHAR(str), flags + WXREGEX_IF_NEED_LEN(str.length())); } bool wxRegEx::GetMatch(size_t *start, size_t *len, size_t index) const