aboutsummaryrefslogtreecommitdiff
path: root/modules/regex_stdlib.cpp
diff options
context:
space:
mode:
authorGravatar Sadie Powell2026-03-28 21:32:23 +0000
committerGravatar Sadie Powell2026-03-29 00:42:15 +0000
commitcbc5431d62e3fe9166f18395dce3ddf2af0906d3 (patch)
tree48a87fc27dc4826ce0caf4071e2060a9ff9e24c5 /modules/regex_stdlib.cpp
parentMove service code from base to its own header. (diff)
Switch modules from reference<> to shared_ptr<> and weak_ptr<>.
Diffstat (limited to 'modules/regex_stdlib.cpp')
-rw-r--r--modules/regex_stdlib.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/modules/regex_stdlib.cpp b/modules/regex_stdlib.cpp
index 427c0a34b..384453d21 100644
--- a/modules/regex_stdlib.cpp
+++ b/modules/regex_stdlib.cpp
@@ -31,7 +31,7 @@ private:
std::regex regex;
public:
- StdLibPattern(const Module* mod, const std::string& pattern, uint8_t options, std::regex::flag_type type)
+ StdLibPattern(const WeakModulePtr& mod, const std::string& pattern, uint8_t options, std::regex::flag_type type)
: Regex::Pattern(pattern, options)
{
// Convert the generic pattern options to stdlib pattern flags.
@@ -77,7 +77,7 @@ class StdLibEngine final
public:
std::regex::flag_type regextype;
- StdLibEngine(Module* Creator)
+ StdLibEngine(const WeakModulePtr& Creator)
: Regex::Engine(Creator, "stdregex")
{
}
@@ -97,7 +97,7 @@ private:
public:
ModuleRegexStdLib()
: Module(VF_VENDOR, "Provides the stdregex regular expression engine which uses the C++11 std::regex regular expression matching system.")
- , regex(this)
+ , regex(weak_from_this())
{
}