mu-regex: make backward-compatible with older glib

This commit is contained in:
Dirk-Jan C. Binnema
2022-12-31 00:10:24 +02:00
parent feb436ce96
commit 60e9d54a7c

View File

@ -28,6 +28,10 @@ namespace Mu {
* PCRE rather than std::regex because it is much faster.
*/
struct Regex {
#if !GLIB_CHECK_VERSION(2,74,0) /* backward compat */
#define G_REGEX_DEFAULT (static_cast<GRegexCompileFlags>(0))
#define G_REGEX_MATCH_DEFAULT (static_cast<GRegexMatchFlags>(0))
#endif
/**
* Trivial constructor
*
@ -35,7 +39,6 @@ struct Regex {
*/
Regex() noexcept: rx_{} {}
/**
* Construct a new Regex object
*