From 7b3659ea19fddd363afea899b74da6a0d36b4fac Mon Sep 17 00:00:00 2001 From: Vadim Zeitlin Date: Sat, 17 Jul 2021 17:39:07 +0200 Subject: [PATCH] Check for WXREGEX_USING_BUILTIN rather than WX_NO_REGEX_ADVANCED No real changes, just get rid of checks for WX_NO_REGEX_ADVANCED which is rather confusing as it's not defined neither when using the system library (which doesn't support advanced RE syntax at all), nor when using PCRE (which always supports it). --- src/common/regex.cpp | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/src/common/regex.cpp b/src/common/regex.cpp index 2c5f1816e7..24cc6a552b 100644 --- a/src/common/regex.cpp +++ b/src/common/regex.cpp @@ -69,8 +69,6 @@ # define WXREGEX_CONVERT_TO_MB # endif -# define WX_NO_REGEX_ADVANCED - // There is an existing pcre2posix library which provides regxxx() // implementations, but we don't use it because: // @@ -1027,7 +1025,7 @@ bool wxRegExImpl::Compile(wxString expr, int flags) #if wxUSE_PCRE # define FLAVORS (wxRE_ADVANCED | wxRE_BASIC) -#elif defined(WX_NO_REGEX_ADVANCED) +#elif !defined(WXREGEX_USING_BUILTIN) # define FLAVORS wxRE_BASIC #else # define FLAVORS (wxRE_ADVANCED | wxRE_BASIC) @@ -1058,7 +1056,7 @@ bool wxRegExImpl::Compile(wxString expr, int flags) int flagsRE = 0; if ( !(flags & wxRE_BASIC) ) { -#ifndef WX_NO_REGEX_ADVANCED +#ifdef WXREGEX_USING_BUILTIN if (flags & wxRE_ADVANCED) flagsRE |= REG_ADVANCED; else