aboutsummaryrefslogtreecommitdiff
path: root/src/libutil
diff options
context:
space:
mode:
authorEelco Dolstra <edolstra@gmail.com>2022-04-05 23:19:35 +0200
committerGitHub <noreply@github.com>2022-04-05 23:19:35 +0200
commitf89fa299141ef9c4d019097b02ce731c60938551 (patch)
tree0165ba16626b33a9ce8c39378070420bf4f25a5d /src/libutil
parent27b952a8a16b75f47d62fd6d3b0cedc8a081655c (diff)
parent513652d5947c1923a004318ea453cab786cabda1 (diff)
Merge pull request #6367 from danpls/fix-npos
tokenizeString: Fix semantic mistake
Diffstat (limited to 'src/libutil')
-rw-r--r--src/libutil/util.cc4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/libutil/util.cc b/src/libutil/util.cc
index 59e3aad6d..8ab385837 100644
--- a/src/libutil/util.cc
+++ b/src/libutil/util.cc
@@ -1259,9 +1259,9 @@ template<class C> C tokenizeString(std::string_view s, std::string_view separato
{
C result;
auto pos = s.find_first_not_of(separators, 0);
- while (pos != std::string::npos) {
+ while (pos != std::string_view::npos) {
auto end = s.find_first_of(separators, pos + 1);
- if (end == std::string::npos) end = s.size();
+ if (end == std::string_view::npos) end = s.size();
result.insert(result.end(), std::string(s, pos, end - pos));
pos = s.find_first_not_of(separators, end);
}