From ad1e5610ecfec9c52db2dcc9b9e767b2e7b27db8 Mon Sep 17 00:00:00 2001 From: "Node.js GitHub Bot" Date: Tue, 16 Jul 2024 03:33:40 +0300 Subject: [PATCH] deps: update googletest to 4b21f1a PR-URL: https://github.com/nodejs/node/pull/53842 Reviewed-By: Marco Ippolito Reviewed-By: Rafael Gonzaga Reviewed-By: Moshe Atlow Reviewed-By: Luigi Pinca --- deps/googletest/include/gtest/internal/gtest-type-util.h | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/deps/googletest/include/gtest/internal/gtest-type-util.h b/deps/googletest/include/gtest/internal/gtest-type-util.h index f94cf614ade746..78da05316d6b0a 100644 --- a/deps/googletest/include/gtest/internal/gtest-type-util.h +++ b/deps/googletest/include/gtest/internal/gtest-type-util.h @@ -71,7 +71,7 @@ inline std::string CanonicalizeForStdLibVersioning(std::string s) { // Strip redundant spaces in typename to match MSVC // For example, std::pair -> std::pair static const char to_search[] = ", "; - static const char replace_str[] = ","; + const char replace_char = ','; size_t pos = 0; while (true) { // Get the next occurrence from the current position @@ -80,8 +80,8 @@ inline std::string CanonicalizeForStdLibVersioning(std::string s) { break; } // Replace this occurrence of substring - s.replace(pos, strlen(to_search), replace_str); - pos += strlen(replace_str); + s.replace(pos, strlen(to_search), 1, replace_char); + ++pos; } return s; }