diff --git a/src/compiler/objective_c_generator.cc b/src/compiler/objective_c_generator.cc index ffdeb8f6b07..39f68cb9565 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; diff --git a/src/compiler/objective_c_plugin.cc b/src/compiler/objective_c_plugin.cc index 76703d79cd8..f0fe3688cca 100644 --- a/src/compiler/objective_c_plugin.cc +++ b/src/compiler/objective_c_plugin.cc @@ -118,11 +118,11 @@ 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) + - "\n" + forward_declarations + "\n" + kNonNullBegin + "\n" + - protocols + "\n" + PreprocIfNot(kProtocolOnly, interfaces) + - "\n" + kNonNullEnd + "\n"); + class_declarations + "\n" + + PreprocIfNot(kForwardDeclare, class_imports) + "\n" + + forward_declarations + "\n" + kNonNullBegin + "\n" + protocols + + "\n" + PreprocIfNot(kProtocolOnly, interfaces) + "\n" + + kNonNullEnd + "\n"); } {