Fix warning about unary minus operator (#8929)

pull/8968/head^2
Sil3ntStorm 3 years ago committed by GitHub
parent d6699989ab
commit 8c7e082920
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 2
      src/google/protobuf/compiler/parser.cc

@ -1549,7 +1549,7 @@ bool Parser::ParseOption(Message* options,
value_location.AddPath(
UninterpretedOption::kNegativeIntValueFieldNumber);
uninterpreted_option->set_negative_int_value(
static_cast<int64_t>(-value));
static_cast<int64_t>(0 - value));
} else {
value_location.AddPath(
UninterpretedOption::kPositiveIntValueFieldNumber);

Loading…
Cancel
Save