From 9c0b35cf620c4904a18e25733f50c9c0474fefa6 Mon Sep 17 00:00:00 2001 From: Bo Yang Date: Thu, 22 Jun 2017 15:39:19 -0700 Subject: Enusre public header and generated code have no implicit converion. --- src/google/protobuf/compiler/cpp/cpp_primitive_field.cc | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'src/google/protobuf/compiler/cpp/cpp_primitive_field.cc') diff --git a/src/google/protobuf/compiler/cpp/cpp_primitive_field.cc b/src/google/protobuf/compiler/cpp/cpp_primitive_field.cc index 020c1941..df7c1730 100644 --- a/src/google/protobuf/compiler/cpp/cpp_primitive_field.cc +++ b/src/google/protobuf/compiler/cpp/cpp_primitive_field.cc @@ -452,7 +452,8 @@ GenerateByteSize(io::Printer* printer) const { printer->Print(variables_, "if (data_size > 0) {\n" " total_size += $tag_size$ +\n" - " ::google::protobuf::internal::WireFormatLite::Int32Size(data_size);\n" + " ::google::protobuf::internal::WireFormatLite::Int32Size(\n" + " static_cast(data_size));\n" "}\n" "int cached_size = ::google::protobuf::internal::ToCachedSize(data_size);\n" "GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN();\n" -- cgit v1.2.3