Remove conversion warning by static casting

pull/24198/head
Christian Maurer 5 years ago
parent e8d5758dc8
commit d48e350d58
  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.ByteSizeLong();
int byte_size = static_cast<int>(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