Skip to content

Commit

Permalink
Use my
Browse files Browse the repository at this point in the history
  • Loading branch information
heinsaar committed Oct 16, 2023
1 parent d171a1d commit c5c188b
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions zen/datas/string.h
Original file line number Diff line number Diff line change
Expand Up @@ -131,7 +131,7 @@ class string : public std::string, private zen::stackonly
if (search.empty()) return *this;

size_t pos = 0;
while ((pos = this->find(search, pos)) != std::string::npos) {
while ((pos = my::find(search, pos)) != std::string::npos) {
std::string::replace(pos, search.length(), replacement);
pos += replacement.length(); // move pos forward by the length of replace to prevent infinite loops
}
Expand All @@ -149,7 +149,7 @@ class string : public std::string, private zen::stackonly
"TEMPLATE PARAMETER Pred MUST RETURN bool, BUT DOES NOT");

size_t pos = 0;
while ((pos = this->find(search, pos)) != std::string::npos) {
while ((pos = my::find(search, pos)) != std::string::npos) {
if (predicate(*this)) {
std::string::replace(pos, search.length(), replacement);
pos += replacement.length(); // move pos forward by the length of replace to prevent infinite loops
Expand Down

0 comments on commit c5c188b

Please sign in to comment.