From 81c5d0b913f216d88ee722895260904e9a1b6ec0 Mon Sep 17 00:00:00 2001 From: Rye Mutt <rye@alchemyviewer.org> Date: Thu, 18 Nov 2021 02:42:00 -0500 Subject: [PATCH] Clean up regex --- indra/llui/llurlentry.cpp | 2 +- indra/newview/llappviewer.cpp | 3 ++- indra/newview/llviewerregion.cpp | 3 ++- indra/newview/rlvcommon.cpp | 3 ++- 4 files changed, 7 insertions(+), 4 deletions(-) diff --git a/indra/llui/llurlentry.cpp b/indra/llui/llurlentry.cpp index 2437f9cedd1..508c5317763 100644 --- a/indra/llui/llurlentry.cpp +++ b/indra/llui/llurlentry.cpp @@ -1573,7 +1573,7 @@ std::string LLUrlEntryIPv6::getLabel(const std::string &url, const LLUrlLabelCal boost::regex regex = boost::regex(mHostPath, boost::regex::perl | boost::regex::icase); boost::match_results<std::string::const_iterator> matches; - if (boost::regex_search(url, matches, regex)) + if (ll_regex_search(url, matches, regex)) { return url.substr(0, matches[0].length()); } diff --git a/indra/newview/llappviewer.cpp b/indra/newview/llappviewer.cpp index 86c62882ab9..39a9080a64a 100644 --- a/indra/newview/llappviewer.cpp +++ b/indra/newview/llappviewer.cpp @@ -31,6 +31,7 @@ #include "llappviewer.h" // Viewer includes +#include "llregex.h" #include "llversioninfo.h" #include "llfeaturemanager.h" #include "lluictrlfactory.h" @@ -1094,7 +1095,7 @@ bool LLAppViewer::init() const boost::regex is_intel_string("[0-9].[0-9].[0-9] - Build [0-9]{1,2}.[0-9]{2}.[0-9]{2}.[0-9]{4}"); - if (boost::regex_search(version, is_intel_string)) + if (ll_regex_search(version, is_intel_string)) { // Valid string, extract driver version std::size_t found = version.find("Build "); diff --git a/indra/newview/llviewerregion.cpp b/indra/newview/llviewerregion.cpp index 441be52170c..38952feb822 100644 --- a/indra/newview/llviewerregion.cpp +++ b/indra/newview/llviewerregion.cpp @@ -34,6 +34,7 @@ #include "llavatarnamecache.h" // name lookup cap url #include "llfloaterreg.h" #include "llmath.h" +#include "llregex.h" #include "llregionflags.h" #include "llregionhandle.h" #include "llsurface.h" @@ -151,7 +152,7 @@ class LLRegionHandler : public LLCommandHandler { url += "/"; } - if (!boost::regex_match(params[i].asString(), i > 0 ? coord_rx : name_rx)) + if (!ll_regex_match(params[i].asString(), i > 0 ? coord_rx : name_rx)) { return false; } diff --git a/indra/newview/rlvcommon.cpp b/indra/newview/rlvcommon.cpp index 7e9a6a1059c..bda1d65d2cc 100644 --- a/indra/newview/rlvcommon.cpp +++ b/indra/newview/rlvcommon.cpp @@ -22,6 +22,7 @@ #include "llimview.h" #include "llinstantmessage.h" #include "llnotificationsutil.h" +#include "llregex.h" #include "llregionhandle.h" #include "llscriptruntimeperms.h" #include "llsdserialize.h" @@ -221,7 +222,7 @@ bool RlvSettings::isCompatibilityModeObject(const LLUUID& idRlvObject) for (const std::string& strCompatName : s_CompatItemNames) { boost::regex regexp(strCompatName, boost::regex::perl | boost::regex::icase); - if (boost::regex_match(strAttachName, regexp)) + if (ll_regex_match(strAttachName, regexp)) { fCompatMode = true; break; -- GitLab