aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/compiler/objective_c_plugin.cc
diff options
context:
space:
mode:
authorGravatar Craig Tiller <ctiller@google.com>2017-11-03 09:09:36 -0700
committerGravatar Craig Tiller <ctiller@google.com>2017-11-03 09:09:36 -0700
commitbaa14a975ef92ee6fb301f0e684f56f18f2c55a7 (patch)
tree9a6cb2df58fe175e8abfccf2cbd40349726e46f3 /src/compiler/objective_c_plugin.cc
parentef68fe7239a89095f1eaa89c1dd28b2b7be2a3c7 (diff)
Update clang-format to 5.0
Diffstat (limited to 'src/compiler/objective_c_plugin.cc')
-rw-r--r--src/compiler/objective_c_plugin.cc30
1 files changed, 15 insertions, 15 deletions
diff --git a/src/compiler/objective_c_plugin.cc b/src/compiler/objective_c_plugin.cc
index e751d0562e..53ff81f94a 100644
--- a/src/compiler/objective_c_plugin.cc
+++ b/src/compiler/objective_c_plugin.cc
@@ -26,19 +26,19 @@
#include <google/protobuf/compiler/objectivec/objectivec_helpers.h>
-using ::google::protobuf::compiler::objectivec::ProtobufLibraryFrameworkName;
using ::google::protobuf::compiler::objectivec::
IsProtobufLibraryBundledProtoFile;
+using ::google::protobuf::compiler::objectivec::ProtobufLibraryFrameworkName;
class ObjectiveCGrpcGenerator : public grpc::protobuf::compiler::CodeGenerator {
public:
ObjectiveCGrpcGenerator() {}
virtual ~ObjectiveCGrpcGenerator() {}
- virtual bool Generate(const grpc::protobuf::FileDescriptor *file,
- const ::grpc::string &parameter,
- grpc::protobuf::compiler::GeneratorContext *context,
- ::grpc::string *error) const {
+ virtual bool Generate(const grpc::protobuf::FileDescriptor* file,
+ const ::grpc::string& parameter,
+ grpc::protobuf::compiler::GeneratorContext* context,
+ ::grpc::string* error) const {
if (file->service_count() == 0) {
// No services. Do nothing.
return true;
@@ -65,7 +65,7 @@ class ObjectiveCGrpcGenerator : public grpc::protobuf::compiler::CodeGenerator {
for (int i = 0; i < file->dependency_count(); i++) {
::grpc::string header =
grpc_objective_c_generator::MessageHeaderName(file->dependency(i));
- const grpc::protobuf::FileDescriptor *dependency = file->dependency(i);
+ const grpc::protobuf::FileDescriptor* dependency = file->dependency(i);
if (IsProtobufLibraryBundledProtoFile(dependency)) {
::grpc::string base_name = header;
grpc_generator::StripPrefix(&base_name, "google/protobuf/");
@@ -88,7 +88,7 @@ class ObjectiveCGrpcGenerator : public grpc::protobuf::compiler::CodeGenerator {
::grpc::string declarations;
for (int i = 0; i < file->service_count(); i++) {
- const grpc::protobuf::ServiceDescriptor *service = file->service(i);
+ const grpc::protobuf::ServiceDescriptor* service = file->service(i);
declarations += grpc_objective_c_generator::GetHeader(service);
}
@@ -96,9 +96,9 @@ class ObjectiveCGrpcGenerator : public grpc::protobuf::compiler::CodeGenerator {
"\nNS_ASSUME_NONNULL_BEGIN\n\n";
static const ::grpc::string kNonNullEnd = "\nNS_ASSUME_NONNULL_END\n";
- Write(context, file_name + ".pbrpc.h", imports + '\n' + proto_imports +
- '\n' + kNonNullBegin +
- declarations + kNonNullEnd);
+ Write(context, file_name + ".pbrpc.h",
+ imports + '\n' + proto_imports + '\n' + kNonNullBegin +
+ declarations + kNonNullEnd);
}
{
@@ -111,7 +111,7 @@ class ObjectiveCGrpcGenerator : public grpc::protobuf::compiler::CodeGenerator {
for (int i = 0; i < file->dependency_count(); i++) {
::grpc::string header =
grpc_objective_c_generator::MessageHeaderName(file->dependency(i));
- const grpc::protobuf::FileDescriptor *dependency = file->dependency(i);
+ const grpc::protobuf::FileDescriptor* dependency = file->dependency(i);
if (IsProtobufLibraryBundledProtoFile(dependency)) {
::grpc::string base_name = header;
grpc_generator::StripPrefix(&base_name, "google/protobuf/");
@@ -133,7 +133,7 @@ class ObjectiveCGrpcGenerator : public grpc::protobuf::compiler::CodeGenerator {
::grpc::string definitions;
for (int i = 0; i < file->service_count(); i++) {
- const grpc::protobuf::ServiceDescriptor *service = file->service(i);
+ const grpc::protobuf::ServiceDescriptor* service = file->service(i);
definitions += grpc_objective_c_generator::GetSource(service);
}
@@ -145,8 +145,8 @@ class ObjectiveCGrpcGenerator : public grpc::protobuf::compiler::CodeGenerator {
private:
// Write the given code into the given file.
- void Write(grpc::protobuf::compiler::GeneratorContext *context,
- const ::grpc::string &filename, const ::grpc::string &code) const {
+ void Write(grpc::protobuf::compiler::GeneratorContext* context,
+ const ::grpc::string& filename, const ::grpc::string& code) const {
std::unique_ptr<grpc::protobuf::io::ZeroCopyOutputStream> output(
context->Open(filename));
grpc::protobuf::io::CodedOutputStream coded_out(output.get());
@@ -154,7 +154,7 @@ class ObjectiveCGrpcGenerator : public grpc::protobuf::compiler::CodeGenerator {
}
};
-int main(int argc, char *argv[]) {
+int main(int argc, char* argv[]) {
ObjectiveCGrpcGenerator generator;
return grpc::protobuf::compiler::PluginMain(argc, argv, &generator);
}