@@ -71,7 +71,7 @@ inline std::string CanonicalizeForStdLibVersioning(std::string s) {
|
71 | 71 | // Strip redundant spaces in typename to match MSVC |
72 | 72 | // For example, std::pair<int, bool> -> std::pair<int,bool> |
73 | 73 | static const char to_search[] = ", "; |
74 | | -static const char replace_str[] = ","; |
| 74 | +const char replace_char = ','; |
75 | 75 | size_t pos = 0; |
76 | 76 | while (true) { |
77 | 77 | // Get the next occurrence from the current position |
@@ -80,8 +80,8 @@ inline std::string CanonicalizeForStdLibVersioning(std::string s) {
|
80 | 80 | break; |
81 | 81 | } |
82 | 82 | // 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; |
85 | 85 | } |
86 | 86 | return s; |
87 | 87 | } |
|