From 718c3f75879ffa7cf11c58bd0fb7bd3fe28b1719 Mon Sep 17 00:00:00 2001 From: rocking Date: Thu, 11 Dec 2014 13:41:17 -0800 Subject: [PATCH] Change cpp and go codegen to use new method properties instead of method options Change on 2014/12/11 by rocking ------------- Created by MOE: http://code.google.com/p/moe-java MOE_MIGRATED_REVID=81906922 --- src/compiler/cpp_generator.cc | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/src/compiler/cpp_generator.cc b/src/compiler/cpp_generator.cc index 1eccbf7e096..e01b496ed69 100644 --- a/src/compiler/cpp_generator.cc +++ b/src/compiler/cpp_generator.cc @@ -43,23 +43,23 @@ namespace grpc_cpp_generator { namespace { bool NoStreaming(const google::protobuf::MethodDescriptor* method) { - return !method->options().has_client_streaming() && - !method->options().has_server_streaming(); + return !method->client_streaming() && + !method->server_streaming(); } bool ClientOnlyStreaming(const google::protobuf::MethodDescriptor* method) { - return method->options().has_client_streaming() && - !method->options().has_server_streaming(); + return method->client_streaming() && + !method->server_streaming(); } bool ServerOnlyStreaming(const google::protobuf::MethodDescriptor* method) { - return !method->options().has_client_streaming() && - method->options().has_server_streaming(); + return !method->client_streaming() && + method->server_streaming(); } bool BidiStreaming(const google::protobuf::MethodDescriptor* method) { - return method->options().has_client_streaming() && - method->options().has_server_streaming(); + return method->client_streaming() && + method->server_streaming(); } bool HasClientOnlyStreaming(const google::protobuf::FileDescriptor* file) {