diff --git a/src/google/protobuf/compiler/cpp/cpp_enum_field.cc b/src/google/protobuf/compiler/cpp/cpp_enum_field.cc index 0d3fdcbe67..960730ca75 100644 --- a/src/google/protobuf/compiler/cpp/cpp_enum_field.cc +++ b/src/google/protobuf/compiler/cpp/cpp_enum_field.cc @@ -144,13 +144,13 @@ GenerateMergeFromCodedStream(io::Printer* printer) const { printer->Print(variables_, "} else {\n" " mutable_unknown_fields()->AddVarint(\n" - " $number$, static_cast<::google::protobuf::uint64>(value));\n"); + " $number$, static_cast< ::google::protobuf::uint64>(value));\n"); } else { printer->Print( "} else {\n" " unknown_fields_stream.WriteVarint32($tag$u);\n" " unknown_fields_stream.WriteVarint32(\n" - " static_cast<::google::protobuf::uint32>(value));\n", + " static_cast< ::google::protobuf::uint32>(value));\n", "tag", SimpleItoa(internal::WireFormat::MakeTag(descriptor_))); } printer->Print(variables_, @@ -347,13 +347,13 @@ GenerateMergeFromCodedStream(io::Printer* printer) const { printer->Print(variables_, "} else {\n" " mutable_unknown_fields()->AddVarint(\n" - " $number$, static_cast<::google::protobuf::uint64>(value));\n"); + " $number$, static_cast< ::google::protobuf::uint64>(value));\n"); } else { printer->Print( "} else {\n" " unknown_fields_stream.WriteVarint32(tag);\n" " unknown_fields_stream.WriteVarint32(\n" - " static_cast<::google::protobuf::uint32>(value));\n"); + " static_cast< ::google::protobuf::uint32>(value));\n"); } printer->Print("}\n"); } @@ -412,12 +412,12 @@ GenerateMergeFromCodedStreamWithPacking(io::Printer* printer) const { if (UseUnknownFieldSet(descriptor_->file(), options_)) { printer->Print(variables_, " mutable_unknown_fields()->AddVarint(\n" - " $number$, static_cast<::google::protobuf::uint64>(value));\n"); + " $number$, static_cast< ::google::protobuf::uint64>(value));\n"); } else { printer->Print(variables_, " unknown_fields_stream.WriteVarint32(tag);\n" " unknown_fields_stream.WriteVarint32(\n" - " static_cast<::google::protobuf::uint32>(value));\n"); + " static_cast< ::google::protobuf::uint32>(value));\n"); } printer->Print( " }\n"); @@ -439,7 +439,7 @@ GenerateSerializeWithCachedSizes(io::Printer* printer) const { " ::google::protobuf::internal::WireFormatLite::WIRETYPE_LENGTH_DELIMITED,\n" " output);\n" " output->WriteVarint32(\n" - " static_cast<::google::protobuf::uint32>(_$name$_cached_byte_size_));\n" + " static_cast< ::google::protobuf::uint32>(_$name$_cached_byte_size_));\n" "}\n"); } printer->Print(variables_, @@ -467,7 +467,7 @@ GenerateSerializeWithCachedSizesToArray(io::Printer* printer) const { " ::google::protobuf::internal::WireFormatLite::WIRETYPE_LENGTH_DELIMITED,\n" " target);\n" " target = ::google::protobuf::io::CodedOutputStream::WriteVarint32ToArray(" - " static_cast<::google::protobuf::uint32>(\n" + " static_cast< ::google::protobuf::uint32>(\n" " _$name$_cached_byte_size_), target);\n" " target = ::google::protobuf::internal::WireFormatLite::WriteEnumNoTagToArray(\n" " this->$name$_, target);\n" @@ -497,7 +497,7 @@ GenerateByteSize(io::Printer* printer) const { "if (data_size > 0) {\n" " total_size += $tag_size$ +\n" " ::google::protobuf::internal::WireFormatLite::Int32Size(\n" - " static_cast(data_size));\n" + " static_cast< ::google::protobuf::int32>(data_size));\n" "}\n" "int cached_size = ::google::protobuf::internal::ToCachedSize(data_size);\n" "GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN();\n" diff --git a/src/google/protobuf/compiler/cpp/cpp_primitive_field.cc b/src/google/protobuf/compiler/cpp/cpp_primitive_field.cc index 83bc096fda..e45f35b359 100644 --- a/src/google/protobuf/compiler/cpp/cpp_primitive_field.cc +++ b/src/google/protobuf/compiler/cpp/cpp_primitive_field.cc @@ -382,7 +382,7 @@ GenerateSerializeWithCachedSizes(io::Printer* printer) const { "$number$, " "::google::protobuf::internal::WireFormatLite::WIRETYPE_LENGTH_DELIMITED, " "output);\n" - " output->WriteVarint32(static_cast<::google::protobuf::uint32>(\n" + " output->WriteVarint32(static_cast< ::google::protobuf::uint32>(\n" " _$name$_cached_byte_size_));\n"); if (FixedSize(descriptor_->type()) > 0) { @@ -423,7 +423,7 @@ GenerateSerializeWithCachedSizesToArray(io::Printer* printer) const { " ::google::protobuf::internal::WireFormatLite::WIRETYPE_LENGTH_DELIMITED,\n" " target);\n" " target = ::google::protobuf::io::CodedOutputStream::WriteVarint32ToArray(\n" - " static_cast<::google::protobuf::uint32>(\n" + " static_cast< ::google::protobuf::uint32>(\n" " _$name$_cached_byte_size_), target);\n" " target = ::google::protobuf::internal::WireFormatLite::\n" " Write$declared_type$NoTagToArray(this->$name$_, target);\n" @@ -455,7 +455,7 @@ GenerateByteSize(io::Printer* printer) const { "if (data_size > 0) {\n" " total_size += $tag_size$ +\n" " ::google::protobuf::internal::WireFormatLite::Int32Size(\n" - " static_cast(data_size));\n" + " static_cast< ::google::protobuf::int32>(data_size));\n" "}\n" "int cached_size = ::google::protobuf::internal::ToCachedSize(data_size);\n" "GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN();\n" diff --git a/src/google/protobuf/descriptor.pb.cc b/src/google/protobuf/descriptor.pb.cc index 6e4e4088eb..48a256dd83 100644 --- a/src/google/protobuf/descriptor.pb.cc +++ b/src/google/protobuf/descriptor.pb.cc @@ -4565,7 +4565,7 @@ bool FieldDescriptorProto::MergePartialFromCodedStream( set_label(static_cast< ::google::protobuf::FieldDescriptorProto_Label >(value)); } else { mutable_unknown_fields()->AddVarint( - 4, static_cast<::google::protobuf::uint64>(value)); + 4, static_cast< ::google::protobuf::uint64>(value)); } } else { goto handle_unusual; @@ -4585,7 +4585,7 @@ bool FieldDescriptorProto::MergePartialFromCodedStream( set_type(static_cast< ::google::protobuf::FieldDescriptorProto_Type >(value)); } else { mutable_unknown_fields()->AddVarint( - 5, static_cast<::google::protobuf::uint64>(value)); + 5, static_cast< ::google::protobuf::uint64>(value)); } } else { goto handle_unusual; @@ -8513,7 +8513,7 @@ bool FileOptions::MergePartialFromCodedStream( set_optimize_for(static_cast< ::google::protobuf::FileOptions_OptimizeMode >(value)); } else { mutable_unknown_fields()->AddVarint( - 9, static_cast<::google::protobuf::uint64>(value)); + 9, static_cast< ::google::protobuf::uint64>(value)); } } else { goto handle_unusual; @@ -10774,7 +10774,7 @@ bool FieldOptions::MergePartialFromCodedStream( set_ctype(static_cast< ::google::protobuf::FieldOptions_CType >(value)); } else { mutable_unknown_fields()->AddVarint( - 1, static_cast<::google::protobuf::uint64>(value)); + 1, static_cast< ::google::protobuf::uint64>(value)); } } else { goto handle_unusual; @@ -10836,7 +10836,7 @@ bool FieldOptions::MergePartialFromCodedStream( set_jstype(static_cast< ::google::protobuf::FieldOptions_JSType >(value)); } else { mutable_unknown_fields()->AddVarint( - 6, static_cast<::google::protobuf::uint64>(value)); + 6, static_cast< ::google::protobuf::uint64>(value)); } } else { goto handle_unusual; @@ -12917,7 +12917,7 @@ bool MethodOptions::MergePartialFromCodedStream( set_idempotency_level(static_cast< ::google::protobuf::MethodOptions_IdempotencyLevel >(value)); } else { mutable_unknown_fields()->AddVarint( - 34, static_cast<::google::protobuf::uint64>(value)); + 34, static_cast< ::google::protobuf::uint64>(value)); } } else { goto handle_unusual; @@ -14703,7 +14703,7 @@ void SourceCodeInfo_Location::SerializeWithCachedSizes( // repeated int32 path = 1 [packed = true]; if (this->path_size() > 0) { ::google::protobuf::internal::WireFormatLite::WriteTag(1, ::google::protobuf::internal::WireFormatLite::WIRETYPE_LENGTH_DELIMITED, output); - output->WriteVarint32(static_cast<::google::protobuf::uint32>( + output->WriteVarint32(static_cast< ::google::protobuf::uint32>( _path_cached_byte_size_)); } for (int i = 0, n = this->path_size(); i < n; i++) { @@ -14714,7 +14714,7 @@ void SourceCodeInfo_Location::SerializeWithCachedSizes( // repeated int32 span = 2 [packed = true]; if (this->span_size() > 0) { ::google::protobuf::internal::WireFormatLite::WriteTag(2, ::google::protobuf::internal::WireFormatLite::WIRETYPE_LENGTH_DELIMITED, output); - output->WriteVarint32(static_cast<::google::protobuf::uint32>( + output->WriteVarint32(static_cast< ::google::protobuf::uint32>( _span_cached_byte_size_)); } for (int i = 0, n = this->span_size(); i < n; i++) { @@ -14773,7 +14773,7 @@ void SourceCodeInfo_Location::SerializeWithCachedSizes( ::google::protobuf::internal::WireFormatLite::WIRETYPE_LENGTH_DELIMITED, target); target = ::google::protobuf::io::CodedOutputStream::WriteVarint32ToArray( - static_cast<::google::protobuf::uint32>( + static_cast< ::google::protobuf::uint32>( _path_cached_byte_size_), target); target = ::google::protobuf::internal::WireFormatLite:: WriteInt32NoTagToArray(this->path_, target); @@ -14786,7 +14786,7 @@ void SourceCodeInfo_Location::SerializeWithCachedSizes( ::google::protobuf::internal::WireFormatLite::WIRETYPE_LENGTH_DELIMITED, target); target = ::google::protobuf::io::CodedOutputStream::WriteVarint32ToArray( - static_cast<::google::protobuf::uint32>( + static_cast< ::google::protobuf::uint32>( _span_cached_byte_size_), target); target = ::google::protobuf::internal::WireFormatLite:: WriteInt32NoTagToArray(this->span_, target); @@ -14849,7 +14849,7 @@ size_t SourceCodeInfo_Location::ByteSizeLong() const { if (data_size > 0) { total_size += 1 + ::google::protobuf::internal::WireFormatLite::Int32Size( - static_cast(data_size)); + static_cast< ::google::protobuf::int32>(data_size)); } int cached_size = ::google::protobuf::internal::ToCachedSize(data_size); GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN(); @@ -14865,7 +14865,7 @@ size_t SourceCodeInfo_Location::ByteSizeLong() const { if (data_size > 0) { total_size += 1 + ::google::protobuf::internal::WireFormatLite::Int32Size( - static_cast(data_size)); + static_cast< ::google::protobuf::int32>(data_size)); } int cached_size = ::google::protobuf::internal::ToCachedSize(data_size); GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN(); @@ -15707,7 +15707,7 @@ void GeneratedCodeInfo_Annotation::SerializeWithCachedSizes( // repeated int32 path = 1 [packed = true]; if (this->path_size() > 0) { ::google::protobuf::internal::WireFormatLite::WriteTag(1, ::google::protobuf::internal::WireFormatLite::WIRETYPE_LENGTH_DELIMITED, output); - output->WriteVarint32(static_cast<::google::protobuf::uint32>( + output->WriteVarint32(static_cast< ::google::protobuf::uint32>( _path_cached_byte_size_)); } for (int i = 0, n = this->path_size(); i < n; i++) { @@ -15756,7 +15756,7 @@ void GeneratedCodeInfo_Annotation::SerializeWithCachedSizes( ::google::protobuf::internal::WireFormatLite::WIRETYPE_LENGTH_DELIMITED, target); target = ::google::protobuf::io::CodedOutputStream::WriteVarint32ToArray( - static_cast<::google::protobuf::uint32>( + static_cast< ::google::protobuf::uint32>( _path_cached_byte_size_), target); target = ::google::protobuf::internal::WireFormatLite:: WriteInt32NoTagToArray(this->path_, target); @@ -15808,7 +15808,7 @@ size_t GeneratedCodeInfo_Annotation::ByteSizeLong() const { if (data_size > 0) { total_size += 1 + ::google::protobuf::internal::WireFormatLite::Int32Size( - static_cast(data_size)); + static_cast< ::google::protobuf::int32>(data_size)); } int cached_size = ::google::protobuf::internal::ToCachedSize(data_size); GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN();