aboutsummaryrefslogtreecommitdiff
path: root/modules
diff options
context:
space:
mode:
authorGravatar Sadie Powell2025-02-28 02:00:57 +0000
committerGravatar Sadie Powell2025-02-28 02:00:57 +0000
commit7ca99a5a00ffe943e23ca870fb22694f560b48e2 (patch)
tree510800ed124f7d0497e1fba15c05280867184431 /modules
parentMerge branch 'insp4' into master. (diff)
Replace insp::substring_view with the C++20 iterator constructor.
Diffstat (limited to 'modules')
-rw-r--r--modules/core/core_message.cpp10
1 files changed, 5 insertions, 5 deletions
diff --git a/modules/core/core_message.cpp b/modules/core/core_message.cpp
index e6d92857f..6cd1ea8c8 100644
--- a/modules/core/core_message.cpp
+++ b/modules/core/core_message.cpp
@@ -47,13 +47,13 @@ public:
if (end_of_name == std::string::npos)
{
// The CTCP only contains a name.
- name = insp::substring_view(text, text.begin() + 1, text.end() - end_of_ctcp);
+ name = std::string_view(text.begin() + 1, text.end() - end_of_ctcp);
body = std::string_view();
return true;
}
// The CTCP contains a name and a body.
- name = insp::substring_view(text, text.begin() + 1, text.begin() + end_of_name);
+ name = std::string_view(text.begin() + 1, text.begin() + end_of_name);
size_t start_of_body = text.find_first_not_of(' ', end_of_name + 1);
if (start_of_body == std::string::npos)
@@ -64,7 +64,7 @@ public:
}
// The CTCP body provided was non-empty.
- body = insp::substring_view(text, text.begin() + start_of_body, text.end() - end_of_ctcp);
+ body = std::string_view(text.begin() + start_of_body, text.end() - end_of_ctcp);
return true;
}
@@ -78,12 +78,12 @@ public:
{
// The CTCP only contains a name.
size_t end_of_ctcp = text.back() == '\x1' ? 1 : 0;
- name = insp::substring_view(text, text.begin() + 1, text.end() - end_of_ctcp);
+ name = std::string_view(text.begin() + 1, text.end() - end_of_ctcp);
return true;
}
// The CTCP contains a name and a body.
- name = insp::substring_view(text, text.begin() + 1, text.begin() + end_of_name);
+ name = std::string_view(text.begin() + 1, text.begin() + end_of_name);
return true;
}