Internal change

PiperOrigin-RevId: 606614720
pull/15805/head
Protobuf Team Bot 10 months ago committed by Copybara-Service
parent 2f9b5e1204
commit 725278a254
  1. 5
      src/google/protobuf/wire_format.cc
  2. 1
      src/google/protobuf/wire_format_unittest.inc

@ -1758,8 +1758,9 @@ size_t WireFormat::MessageSetItemByteSize(const FieldDescriptor* field,
our_size += io::CodedOutputStream::VarintSize32(field->number());
// message
const Message& sub_message = message_reflection->GetMessage(message, field);
size_t message_size = sub_message.ByteSizeLong();
size_t message_size;
const Message& sub_message = message_reflection->GetMessage(message, field);
message_size = sub_message.ByteSizeLong();
our_size += io::CodedOutputStream::VarintSize32(message_size);
our_size += message_size;

@ -26,6 +26,7 @@
#include "absl/strings/match.h"
#include "google/protobuf/descriptor.h"
#include "google/protobuf/dynamic_message.h"
#include "google/protobuf/generated_message_tctable_impl.h"
#include "google/protobuf/io/coded_stream.h"
#include "google/protobuf/io/zero_copy_stream_impl.h"
#include "google/protobuf/io/zero_copy_stream_impl_lite.h"

Loading…
Cancel
Save