Address conversion warning by explicitly casting to size_t

Closes #3762

PiperOrigin-RevId: 428593750
Change-Id: Ifac216568fbc7d999adb71996ec6a1bbe3b97412
This commit is contained in:
Abseil Team 2022-02-14 13:27:54 -08:00 committed by Copybara-Service
parent 0e402173c9
commit ea55f1f52c

View File

@ -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(