Skip to content

Commit

Permalink
revert
Browse files Browse the repository at this point in the history
  • Loading branch information
belous-dp authored and ladisgin committed Mar 14, 2024
1 parent cce85be commit 1f3044e
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
6 changes: 3 additions & 3 deletions server/src/utils/StringUtils.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -139,10 +139,10 @@ namespace StringUtils {
rtrim(s);
}

std::string repeat(const std::string &s, size_t n) {
std::string repeat(const std::string &s, int n) {
std::string s1;
s1.reserve(s.size() * std::max(std::size_t{0}, n));
for (size_t i = 0; i < n; i++) {
s1.reserve(s.size() * std::max(0, n));
for (int i = 0; i < n; i++) {
s1 += s;
}
return s1;
Expand Down
2 changes: 1 addition & 1 deletion server/src/utils/StringUtils.h
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@ namespace StringUtils {

void trim(std::string &s);

std::string repeat(const std::string &s, size_t n);
std::string repeat(const std::string &s, int n);

bool contains(std::string_view s, std::string_view t);

Expand Down

0 comments on commit 1f3044e

Please sign in to comment.