clang-format

pull/11341/head
Muxi Yan 8 years ago
parent 28dbc84a53
commit 732498b911
  1. 3
      src/compiler/objective_c_generator_helpers.h
  2. 7
      src/compiler/objective_c_plugin.cc

@ -46,7 +46,8 @@ using ::grpc::protobuf::FileDescriptor;
using ::grpc::protobuf::ServiceDescriptor;
using ::grpc::string;
inline string MessageHeaderName(const FileDescriptor *file, bool dash_as_separator) {
inline string MessageHeaderName(const FileDescriptor *file,
bool dash_as_separator) {
if (dash_as_separator) {
return google::protobuf::compiler::objectivec::FilePath(file) + ".pbobjc.h";
} else {

@ -63,7 +63,8 @@ class ObjectiveCGrpcGenerator : public grpc::protobuf::compiler::CodeGenerator {
// Simple parameter parsing as we have only one parameter.
// TODO(mxyan): Complete parameter parsing.
bool dash_as_separator = (0 == parameter.compare("filename-dash-as-separator"));
bool dash_as_separator =
(0 == parameter.compare("filename-dash-as-separator"));
if (dash_as_separator) {
file_name = google::protobuf::compiler::objectivec::FilePath(file);
} else {
@ -85,8 +86,8 @@ class ObjectiveCGrpcGenerator : public grpc::protobuf::compiler::CodeGenerator {
// and import the files in the .pbrpc.m
::grpc::string proto_imports;
for (int i = 0; i < file->dependency_count(); i++) {
::grpc::string header =
grpc_objective_c_generator::MessageHeaderName(file->dependency(i), dash_as_separator);
::grpc::string header = grpc_objective_c_generator::MessageHeaderName(
file->dependency(i), dash_as_separator);
const grpc::protobuf::FileDescriptor *dependency = file->dependency(i);
if (IsProtobufLibraryBundledProtoFile(dependency)) {
::grpc::string base_name = header;

Loading…
Cancel
Save