aboutsummaryrefslogtreecommitdiff
path: root/src/google/protobuf/compiler/cpp
diff options
context:
space:
mode:
authorPaul Yang <TeBoring@users.noreply.github.com>2017-07-13 11:20:11 -0700
committerGitHub <noreply@github.com>2017-07-13 11:20:11 -0700
commitd3bbf1c8a98fe01c115f525c516e575d87c11a47 (patch)
tree7580848855ce65450b81dc13a548fb4ecd294310 /src/google/protobuf/compiler/cpp
parent6aa4b20fc7db7e18a37d02db9c4fefe70e07c2d0 (diff)
downloadprotobuf-d3bbf1c8a98fe01c115f525c516e575d87c11a47.tar.gz
protobuf-d3bbf1c8a98fe01c115f525c516e575d87c11a47.tar.bz2
protobuf-d3bbf1c8a98fe01c115f525c516e575d87c11a47.zip
Add space between arrow and casted type (#3353)
Diffstat (limited to 'src/google/protobuf/compiler/cpp')
-rw-r--r--src/google/protobuf/compiler/cpp/cpp_enum_field.cc18
-rw-r--r--src/google/protobuf/compiler/cpp/cpp_primitive_field.cc6
2 files changed, 12 insertions, 12 deletions
diff --git a/src/google/protobuf/compiler/cpp/cpp_enum_field.cc b/src/google/protobuf/compiler/cpp/cpp_enum_field.cc
index 0d3fdcbe..960730ca 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<google::protobuf::int32>(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 83bc096f..e45f35b3 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<google::protobuf::int32>(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"