diff options
author | Sadie Powell <sadie@witchery.services> | 2024-03-18 12:42:41 +0000 |
---|---|---|
committer | Sadie Powell <sadie@witchery.services> | 2024-03-18 12:47:43 +0000 |
commit | 413fed474e7fbdc10128482284700f0fad41e31a (patch) | |
tree | 94b7d1ab522911c4c635f3b9cdd8a274fc6aee0c /src | |
parent | 60083834f802456382ffc63f0c908db3e2676feb (diff) |
Fix unnecessary uses of std::string.
Diffstat (limited to 'src')
-rw-r--r-- | src/hashcomp.cpp | 4 | ||||
-rw-r--r-- | src/process.cpp | 2 | ||||
-rw-r--r-- | src/threadengine.cpp | 2 |
3 files changed, 4 insertions, 4 deletions
diff --git a/src/hashcomp.cpp b/src/hashcomp.cpp index a32fee037..f5b026f54 100644 --- a/src/hashcomp.cpp +++ b/src/hashcomp.cpp @@ -106,7 +106,7 @@ bool sepstream::GetToken(Anope::string &token) if (!this->allow_empty) { this->pos = this->tokens.find_first_not_of(this->sep, this->pos); - if (this->pos == std::string::npos) + if (this->pos == Anope::string::npos) { this->pos = this->tokens.length() + 1; token.clear(); @@ -115,7 +115,7 @@ bool sepstream::GetToken(Anope::string &token) } size_t p = this->tokens.find(this->sep, this->pos); - if (p == std::string::npos) + if (p == Anope::string::npos) p = this->tokens.length(); token = this->tokens.substr(this->pos, p - this->pos); diff --git a/src/process.cpp b/src/process.cpp index bb31358c8..2c161de23 100644 --- a/src/process.cpp +++ b/src/process.cpp @@ -202,7 +202,7 @@ bool IRCDProto::Format(Anope::string &message, const Anope::map<Anope::string> & const auto &last = params.back(); - if (last.empty() || last[0] == ':' || last.find(' ') != std::string::npos) + if (last.empty() || last[0] == ':' || last.find(' ') != Anope::string::npos) buffer << ':'; buffer << last; } diff --git a/src/threadengine.cpp b/src/threadengine.cpp index 08765c4e4..625e97713 100644 --- a/src/threadengine.cpp +++ b/src/threadengine.cpp @@ -51,7 +51,7 @@ void Thread::Start() catch (const std::system_error &err) { this->flags[SF_DEAD] = true; - throw CoreException("Unable to create thread: " + std::string(err.what())); + throw CoreException("Unable to create thread: " + Anope::string(err.what())); } } |