Skip to content

Commit 362afa5

Browse files
deps: update googletest to 4b21f1a
PR-URL: #53842 Reviewed-By: Marco Ippolito <marcoippolito54@gmail.com> Reviewed-By: Rafael Gonzaga <rafael.nunu@hotmail.com> Reviewed-By: Moshe Atlow <moshe@atlow.co.il> Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
1 parent 3fea216 commit 362afa5

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

deps/googletest/include/gtest/internal/gtest-type-util.h

+3-3
Original file line numberDiff line numberDiff line change
@@ -71,7 +71,7 @@ inline std::string CanonicalizeForStdLibVersioning(std::string s) {
7171
// Strip redundant spaces in typename to match MSVC
7272
// For example, std::pair<int, bool> -> std::pair<int,bool>
7373
static const char to_search[] = ", ";
74-
static const char replace_str[] = ",";
74+
const char replace_char = ',';
7575
size_t pos = 0;
7676
while (true) {
7777
// Get the next occurrence from the current position
@@ -80,8 +80,8 @@ inline std::string CanonicalizeForStdLibVersioning(std::string s) {
8080
break;
8181
}
8282
// Replace this occurrence of substring
83-
s.replace(pos, strlen(to_search), replace_str);
84-
pos += strlen(replace_str);
83+
s.replace(pos, strlen(to_search), 1, replace_char);
84+
++pos;
8585
}
8686
return s;
8787
}

0 commit comments

Comments
 (0)