diff options
author | Abseil Team <absl-team@google.com> | 2022-02-14 21:27:54 (GMT) |
---|---|---|
committer | Copybara-Service <copybara-worker@google.com> | 2022-02-14 21:28:28 (GMT) |
commit | ea55f1f52c489535f0d3b583c81529762c9cb5ea (patch) | |
tree | a9ed538b149f86a7ca5974026d51230e5a073cd4 /googletest/src | |
parent | 0e402173c97aea7a00749e825b194bfede4f2e45 (diff) | |
download | googletest-ea55f1f52c489535f0d3b583c81529762c9cb5ea.zip googletest-ea55f1f52c489535f0d3b583c81529762c9cb5ea.tar.gz googletest-ea55f1f52c489535f0d3b583c81529762c9cb5ea.tar.bz2 |
Address conversion warning by explicitly casting to size_t
Closes #3762
PiperOrigin-RevId: 428593750
Change-Id: Ifac216568fbc7d999adb71996ec6a1bbe3b97412
Diffstat (limited to 'googletest/src')
-rw-r--r-- | googletest/src/gtest.cc | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/googletest/src/gtest.cc b/googletest/src/gtest.cc index 4775fbc..396fdfe 100644 --- a/googletest/src/gtest.cc +++ b/googletest/src/gtest.cc @@ -45,6 +45,7 @@ #include <cmath> #include <cstdint> #include <iomanip> +#include <iterator> #include <limits> #include <list> #include <map> @@ -745,7 +746,8 @@ class UnitTestFilter { const auto exact_match_patterns_begin = std::partition( all_patterns.begin(), all_patterns.end(), &IsGlobPattern); - glob_patterns_.reserve(exact_match_patterns_begin - all_patterns.begin()); + glob_patterns_.reserve(static_cast<size_t>( + std::distance(all_patterns.begin(), exact_match_patterns_begin))); std::move(all_patterns.begin(), exact_match_patterns_begin, std::inserter(glob_patterns_, glob_patterns_.begin())); std::move( |