diff --git a/googlemock/include/gmock/gmock-matchers.h b/googlemock/include/gmock/gmock-matchers.h index 6b264d69..a480576d 100644 --- a/googlemock/include/gmock/gmock-matchers.h +++ b/googlemock/include/gmock/gmock-matchers.h @@ -1474,6 +1474,7 @@ class SomeOfArrayMatcher { operator Matcher() const { // NOLINT using RawU = typename std::decay::type; std::vector> matchers; + matchers.reserve(matchers_.size()); for (const auto& matcher : matchers_) { matchers.push_back(MatcherCast(matcher)); }