123456789101112131415161718192021 |
- diff --git a/src/compiler/cpp_generator.cc b/src/compiler/cpp_generator.cc
- index 9b8ec0f..3baa5f3 100644
- --- a/src/compiler/cpp_generator.cc
- +++ b/src/compiler/cpp_generator.cc
- @@ -1972,6 +1972,7 @@ void PrintSourceService(grpc_generator::Printer* printer,
- printer->Print(*vars, "};\n\n");
- }
- + (*vars)["OptionsVariableName"] = service->method_count() ? "options" : "";
- printer->Print(*vars,
- "std::unique_ptr< $ns$$Service$::Stub> $ns$$Service$::NewStub("
- "const std::shared_ptr< ::grpc::ChannelInterface>& channel, "
- @@ -1984,7 +1985,7 @@ void PrintSourceService(grpc_generator::Printer* printer,
- printer->Print(*vars,
- "$ns$$Service$::Stub::Stub(const std::shared_ptr< "
- "::grpc::ChannelInterface>& channel, const "
- - "::grpc::StubOptions& options)\n");
- + "::grpc::StubOptions& $OptionsVariableName$)\n");
- printer->Indent();
- printer->Print(": channel_(channel)");
- for (int i = 0; i < service->method_count(); ++i) {
|