X-Git-Url: https://git.netwichtig.de/gitweb/?a=blobdiff_plain;f=src%2Fmodules%2Fextra%2Fm_regex_stdlib.cpp;h=0e9021d84eff0da7a2485a28034519344c0b1090;hb=772f7ceb94242a8ebfadd0d4e31209c0b51c2923;hp=aecb37dd673985d12eeb97f382dc9cd87ab4440c;hpb=c5680d6493a07e6625cc84db0639811bb1a45aee;p=user%2Fhenk%2Fcode%2Finspircd.git diff --git a/src/modules/extra/m_regex_stdlib.cpp b/src/modules/extra/m_regex_stdlib.cpp index aecb37dd6..0e9021d84 100644 --- a/src/modules/extra/m_regex_stdlib.cpp +++ b/src/modules/extra/m_regex_stdlib.cpp @@ -2,7 +2,7 @@ * InspIRCd -- Internet Relay Chat Daemon * * Copyright (C) 2019 Robby - * Copyright (C) 2013, 2016, 2018 Sadie Powell + * Copyright (C) 2013, 2016, 2018, 2020-2021 Sadie Powell * Copyright (C) 2013 Attila Molnar * Copyright (C) 2012 ChrisTX * @@ -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()); } @@ -69,7 +70,7 @@ public: Version GetVersion() CXX11_OVERRIDE { - return Version("Provides a regular expression engine which uses the C++11 std::regex regular expression matching system.", VF_VENDOR); + return Version("Provides the stdregex regular expression engine which uses the C++11 std::regex regular expression matching system.", VF_VENDOR); } void ReadConfig(ConfigStatus& status) CXX11_OVERRIDE