diff options
-rw-r--r-- | src/modules/extra/m_regex_stdlib.cpp | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/src/modules/extra/m_regex_stdlib.cpp b/src/modules/extra/m_regex_stdlib.cpp index 149ff3b38..b9602fe01 100644 --- a/src/modules/extra/m_regex_stdlib.cpp +++ b/src/modules/extra/m_regex_stdlib.cpp @@ -33,10 +33,11 @@ class StdRegex : public Regex public: StdRegex(const std::string& rx, std::regex::flag_type fltype) : Regex(rx) { - try{ + try + { regexcl.assign(rx, fltype | std::regex::optimize); } - catch(std::regex_error rxerr) + catch(const std::regex_error& rxerr) { throw RegexException(rx, rxerr.what()); } |