aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/compiler/objective_c_plugin.cc
diff options
context:
space:
mode:
authorGravatar Makarand Dharmapurikar <makarandd@google.com>2016-07-08 11:42:07 -0700
committerGravatar Makarand Dharmapurikar <makarandd@google.com>2016-07-08 11:42:07 -0700
commit46cc9eebb17b2711515007d7af9108cd0d78788a (patch)
treedc5c99a3ffc544afb6e137c1655ce4c33fce4976 /src/compiler/objective_c_plugin.cc
parent2b220f8be7c80d4d51f9506f359608fce3b78ccb (diff)
addressed feedback
using 'using'. Removed unnecessary grpc::string. fixed indentation.
Diffstat (limited to 'src/compiler/objective_c_plugin.cc')
-rw-r--r--src/compiler/objective_c_plugin.cc18
1 files changed, 10 insertions, 8 deletions
diff --git a/src/compiler/objective_c_plugin.cc b/src/compiler/objective_c_plugin.cc
index 43e4b3647d..3878a33251 100644
--- a/src/compiler/objective_c_plugin.cc
+++ b/src/compiler/objective_c_plugin.cc
@@ -41,6 +41,9 @@
#include <google/protobuf/compiler/objectivec/objectivec_helpers.h>
+using ::google::protobuf::compiler::objectivec::ProtobufLibraryFrameworkName;
+using ::google::protobuf::compiler::objectivec::IsProtobufLibraryBundledProtoFile;
+
class ObjectiveCGrpcGenerator : public grpc::protobuf::compiler::CodeGenerator {
public:
ObjectiveCGrpcGenerator() {}
@@ -75,17 +78,16 @@ class ObjectiveCGrpcGenerator : public grpc::protobuf::compiler::CodeGenerator {
::grpc::string header = grpc_objective_c_generator::MessageHeaderName(
file->dependency(i));
const grpc::protobuf::FileDescriptor *dependency = file->dependency(i);
- if (::google::protobuf::compiler::objectivec::IsProtobufLibraryBundledProtoFile(dependency)) {
+ if (IsProtobufLibraryBundledProtoFile(dependency)) {
::grpc::string base_name = header;
grpc_generator::StripPrefix(&base_name, "google/protobuf/");
proto_imports +=
- ::grpc::string("#if GPB_USE_PROTOBUF_FRAMEWORK_IMPORTS\n") +
- ::grpc::string(" #import <") +
- ::google::protobuf::compiler::objectivec::ProtobufLibraryFrameworkName +
- ("/") + base_name + ">\n" +
- ::grpc::string("#else\n") +
- ::grpc::string(" #import \"") + header + "\"\n" +
- ::grpc::string("#endif\n");
+ "#if GPB_USE_PROTOBUF_FRAMEWORK_IMPORTS\n"
+ " #import <" + ::grpc::string(ProtobufLibraryFrameworkName) +
+ "/" + base_name + ">\n"
+ "#else\n"
+ " #import \"" + header + "\"\n"
+ "#endif\n";
} else {
proto_imports += ::grpc::string("#import \"") + header + "\"\n";
}