aboutsummaryrefslogtreecommitdiff
path: root/include/modules/regex.h
diff options
context:
space:
mode:
authorGravatar Sadie Powell2021-04-06 20:06:18 +0100
committerGravatar Sadie Powell2021-04-07 10:36:11 +0100
commit942fd2bcfd384a12c900999fe663202c87319a68 (patch)
treec2bad1906af27afbc3c7d96c3e5ca3c27c83f090 /include/modules/regex.h
parentMerge branch 'insp3' into master. (diff)
Switch simple iterator loops to use range-based for loops.
Diffstat (limited to 'include/modules/regex.h')
-rw-r--r--include/modules/regex.h4
1 files changed, 2 insertions, 2 deletions
diff --git a/include/modules/regex.h b/include/modules/regex.h
index 1ae7acd73..549b00918 100644
--- a/include/modules/regex.h
+++ b/include/modules/regex.h
@@ -193,9 +193,9 @@ inline Regex::PatternPtr Regex::Engine::CreateHuman(const std::string& pattern)
throw Exception(pattern, "Regex patterns must be terminated with a '/'!");
uint8_t options = Regex::OPT_NONE;
- for (std::string::const_iterator iter = pattern.begin() + end + 1; iter != pattern.end(); ++iter)
+ for (const auto& flag : insp::iterator_range(pattern.begin() + end + 1, pattern.end()))
{
- switch (*iter)
+ switch (flag)
{
case 'I':
case 'i':