Stop using ByteSize as it's deprecated.

Fixes #21603
pull/21827/head
Nicolas Noble 5 years ago committed by GitHub
parent 3ab278292f
commit de76cf8522
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 2
      include/grpcpp/impl/codegen/proto_utils.h

@ -49,7 +49,7 @@ Status GenericSerialize(const grpc::protobuf::MessageLite& msg, ByteBuffer* bb,
"ProtoBufferWriter must be a subclass of "
"::protobuf::io::ZeroCopyOutputStream");
*own_buffer = true;
int byte_size = msg.ByteSize();
int byte_size = msg.ByteSizeLong();
if ((size_t)byte_size <= GRPC_SLICE_INLINED_SIZE) {
Slice slice(byte_size);
// We serialize directly into the allocated slices memory

Loading…
Cancel
Save