Fix warning about a bool==uint64 check.

PiperOrigin-RevId: 635512395
pull/16896/head
Protobuf Team Bot 6 months ago committed by Copybara-Service
parent 01b0b8e06e
commit 858a2ab52f
  1. 3
      src/google/protobuf/text_format.cc

@ -19,6 +19,7 @@
#include <climits>
#include <cmath>
#include <cstddef>
#include <cstdint>
#include <limits>
#include <string>
#include <utility>
@ -917,7 +918,7 @@ class TextFormat::Parser::ParserImpl {
if (LookingAtType(io::Tokenizer::TYPE_INTEGER)) {
uint64_t value;
DO(ConsumeUnsignedInteger(&value, 1));
SET_FIELD(Bool, bool, value);
SET_FIELD(Bool, bool, static_cast<bool>(value));
} else {
std::string value;
DO(ConsumeIdentifier(&value));

Loading…
Cancel
Save