diff options
author | Benjamin Herzog <pirat267@gmail.com> | 2016-04-22 11:17:43 +0200 |
---|---|---|
committer | Benjamin Herzog <pirat267@gmail.com> | 2016-04-22 11:18:46 +0200 |
commit | ee6de9365b9d2a79cd7874b4976372c681fb257d (patch) | |
tree | 787c6150e18165ed4ab0df93943421a0a38c9bce /src/compiler/objective_c_plugin.cc | |
parent | 208795c0fe7a2783c370adfa9b4ff3f73101961a (diff) |
Move nonnull begin to correct position
Diffstat (limited to 'src/compiler/objective_c_plugin.cc')
-rw-r--r-- | src/compiler/objective_c_plugin.cc | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/src/compiler/objective_c_plugin.cc b/src/compiler/objective_c_plugin.cc index f62faa5261..9522956fde 100644 --- a/src/compiler/objective_c_plugin.cc +++ b/src/compiler/objective_c_plugin.cc @@ -64,8 +64,7 @@ class ObjectiveCGrpcGenerator : public grpc::protobuf::compiler::CodeGenerator { ".pbobjc.h\"\n\n" "#import <ProtoRPC/ProtoService.h>\n" "#import <RxLibrary/GRXWriteable.h>\n" - "#import <RxLibrary/GRXWriter.h>\n\n" - "NS_ASSUME_NONNULL_BEGIN\n\n"; + "#import <RxLibrary/GRXWriter.h>\n"; // TODO(jcanizales): Instead forward-declare the input and output types // and import the files in the .pbrpc.m @@ -82,10 +81,12 @@ class ObjectiveCGrpcGenerator : public grpc::protobuf::compiler::CodeGenerator { declarations += grpc_objective_c_generator::GetHeader(service); } + ::grpc::string nonNullBegin = "\nNS_ASSUME_NONNULL_BEGIN\n\n"; ::grpc::string nonNullEnd = "\nNS_ASSUME_NONNULL_END\n"; Write(context, file_name + ".pbrpc.h", - imports + '\n' + proto_imports + '\n' + declarations + nonNullEnd); + imports + '\n' + proto_imports + '\n' + nonNullBegin + + declarations + nonNullEnd); } { |