Commit 314adcd4 authored by Abseil Team's avatar Abseil Team Committed by Derek Mauro
Browse files

Googletest export

gmock-internal-utils.cc: Use `static_cast` instead of implicit conversion between signed and unsigned types
Fixes #3550

PiperOrigin-RevId: 396826071
parent 4ea61b96
......@@ -211,7 +211,7 @@ constexpr char UnBase64Impl(char c, const char* const base64, char carry) {
template <size_t... I>
constexpr std::array<char, 256> UnBase64Impl(IndexSequence<I...>,
const char* const base64) {
return {{UnBase64Impl(I, base64, 0)...}};
return {{UnBase64Impl(static_cast<char>(I), base64, 0)...}};
}
constexpr std::array<char, 256> UnBase64(const char* const base64) {
......@@ -232,7 +232,7 @@ bool Base64Unescape(const std::string& encoded, std::string* decoded) {
if (std::isspace(src) || src == '=') {
continue;
}
char src_bin = kUnBase64[src];
char src_bin = kUnBase64[static_cast<size_t>(src)];
if (src_bin >= 64) {
decoded->clear();
return false;
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment