From 8827bc91eb1dbb6b30792c206085cb9a1a01b8a6 Mon Sep 17 00:00:00 2001 From: Tyson Roberts Date: Tue, 20 Mar 2018 17:44:47 +0900 Subject: Changes \#if forward_declare \#else \#end in .h files to \#if --- src/compiler/objective_c_plugin.cc | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/compiler') diff --git a/src/compiler/objective_c_plugin.cc b/src/compiler/objective_c_plugin.cc index 76703d79cd..2581681999 100644 --- a/src/compiler/objective_c_plugin.cc +++ b/src/compiler/objective_c_plugin.cc @@ -118,8 +118,8 @@ class ObjectiveCGrpcGenerator : public grpc::protobuf::compiler::CodeGenerator { Write(context, file_name + ".pbrpc.h", PreprocIfNot(kForwardDeclare, imports) + "\n" + PreprocIfNot(kProtocolOnly, system_imports) + "\n" + - PreprocIfElse(kForwardDeclare, class_declarations, - class_imports) + + class_declarations + "\n" + PreprocIfNot(kForwardDeclare, class_imports) + "\n" + forward_declarations + "\n" + kNonNullBegin + "\n" + protocols + "\n" + PreprocIfNot(kProtocolOnly, interfaces) + "\n" + kNonNullEnd + "\n"); -- cgit v1.2.3 From 7f5dcc9c1a2f9164204e42401104f92020422689 Mon Sep 17 00:00:00 2001 From: Muxi Yan Date: Tue, 3 Apr 2018 13:59:56 -0700 Subject: Add missing '+' --- src/compiler/objective_c_plugin.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/compiler') diff --git a/src/compiler/objective_c_plugin.cc b/src/compiler/objective_c_plugin.cc index 2581681999..dbd3785e99 100644 --- a/src/compiler/objective_c_plugin.cc +++ b/src/compiler/objective_c_plugin.cc @@ -118,7 +118,7 @@ class ObjectiveCGrpcGenerator : public grpc::protobuf::compiler::CodeGenerator { Write(context, file_name + ".pbrpc.h", PreprocIfNot(kForwardDeclare, imports) + "\n" + PreprocIfNot(kProtocolOnly, system_imports) + "\n" + - class_declarations + "\n" + class_declarations + "\n" + PreprocIfNot(kForwardDeclare, class_imports) + "\n" + forward_declarations + "\n" + kNonNullBegin + "\n" + protocols + "\n" + PreprocIfNot(kProtocolOnly, interfaces) + -- cgit v1.2.3 From 3b33409e66d49a79fe4f598fc45e4c3edb2e7d37 Mon Sep 17 00:00:00 2001 From: Muxi Yan Date: Tue, 3 Apr 2018 14:00:43 -0700 Subject: clang format --- src/compiler/objective_c_plugin.cc | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'src/compiler') diff --git a/src/compiler/objective_c_plugin.cc b/src/compiler/objective_c_plugin.cc index dbd3785e99..f0fe3688cc 100644 --- a/src/compiler/objective_c_plugin.cc +++ b/src/compiler/objective_c_plugin.cc @@ -119,10 +119,10 @@ class ObjectiveCGrpcGenerator : public grpc::protobuf::compiler::CodeGenerator { PreprocIfNot(kForwardDeclare, imports) + "\n" + PreprocIfNot(kProtocolOnly, system_imports) + "\n" + class_declarations + "\n" + - PreprocIfNot(kForwardDeclare, class_imports) + - "\n" + forward_declarations + "\n" + kNonNullBegin + "\n" + - protocols + "\n" + PreprocIfNot(kProtocolOnly, interfaces) + - "\n" + kNonNullEnd + "\n"); + PreprocIfNot(kForwardDeclare, class_imports) + "\n" + + forward_declarations + "\n" + kNonNullBegin + "\n" + protocols + + "\n" + PreprocIfNot(kProtocolOnly, interfaces) + "\n" + + kNonNullEnd + "\n"); } { -- cgit v1.2.3 From 19ca19beed133f6db9c55376a5e431a610e00d28 Mon Sep 17 00:00:00 2001 From: Muxi Yan Date: Wed, 4 Apr 2018 11:15:26 -0700 Subject: Fix indent --- src/compiler/objective_c_generator.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/compiler') diff --git a/src/compiler/objective_c_generator.cc b/src/compiler/objective_c_generator.cc index ffdeb8f6b0..39f68cb956 100644 --- a/src/compiler/objective_c_generator.cc +++ b/src/compiler/objective_c_generator.cc @@ -206,7 +206,7 @@ void PrintMethodImplementations(Printer* printer, } } for (auto one_class : classes) { - output += " @class " + one_class + ";\n"; + output += "@class " + one_class + ";\n"; } return output; -- cgit v1.2.3