aboutsummaryrefslogtreecommitdiffhomepage
path: root/src
diff options
context:
space:
mode:
authorGravatar Ben Sykes <bsykes@netflix.com>2018-05-02 13:23:33 -0700
committerGravatar Ben Sykes <bsykes@netflix.com>2018-05-02 13:23:33 -0700
commit86d65ce29032840349b165d63fbee213fb2612d8 (patch)
tree26fb9ed335e55f1f62a9621404bdab3dae5b4f79 /src
parent1de3f4ae8d7de2bee7cf5ad3f014cd8f7f76bb0b (diff)
cleanup formatting with clang_format_code.sh
Diffstat (limited to 'src')
-rw-r--r--src/compiler/node_generator.cc9
-rw-r--r--src/compiler/node_generator.h3
-rw-r--r--src/compiler/node_plugin.cc4
3 files changed, 10 insertions, 6 deletions
diff --git a/src/compiler/node_generator.cc b/src/compiler/node_generator.cc
index 36ee60a198..a430628dbc 100644
--- a/src/compiler/node_generator.cc
+++ b/src/compiler/node_generator.cc
@@ -120,7 +120,8 @@ grpc::string NodeObjectPath(const Descriptor* descriptor) {
}
// Prints out the message serializer and deserializer functions
-void PrintMessageTransformer(const Descriptor* descriptor, Printer* out, const Parameters& params) {
+void PrintMessageTransformer(const Descriptor* descriptor, Printer* out,
+ const Parameters& params) {
map<grpc::string, grpc::string> template_vars;
grpc::string full_name = descriptor->full_name();
template_vars["identifier_name"] = MessageIdentifierName(full_name);
@@ -225,7 +226,8 @@ void PrintImports(const FileDescriptor* file, Printer* out) {
out->Print("\n");
}
-void PrintTransformers(const FileDescriptor* file, Printer* out, const Parameters& params) {
+void PrintTransformers(const FileDescriptor* file, Printer* out,
+ const Parameters& params) {
map<grpc::string, const Descriptor*> messages = GetAllMessages(file);
for (std::map<grpc::string, const Descriptor*>::iterator it =
messages.begin();
@@ -242,7 +244,8 @@ void PrintServices(const FileDescriptor* file, Printer* out) {
}
} // namespace
-grpc::string GenerateFile(const FileDescriptor* file, const Parameters& params) {
+grpc::string GenerateFile(const FileDescriptor* file,
+ const Parameters& params) {
grpc::string output;
{
StringOutputStream output_stream(&output);
diff --git a/src/compiler/node_generator.h b/src/compiler/node_generator.h
index 6906f2f450..f3a531597a 100644
--- a/src/compiler/node_generator.h
+++ b/src/compiler/node_generator.h
@@ -29,7 +29,8 @@ struct Parameters {
int minimum_node_version;
};
-grpc::string GenerateFile(const grpc::protobuf::FileDescriptor* file, const Parameters& params);
+grpc::string GenerateFile(const grpc::protobuf::FileDescriptor* file,
+ const Parameters& params);
} // namespace grpc_node_generator
diff --git a/src/compiler/node_plugin.cc b/src/compiler/node_plugin.cc
index a224ac89d0..0d19d8e982 100644
--- a/src/compiler/node_plugin.cc
+++ b/src/compiler/node_plugin.cc
@@ -36,7 +36,6 @@ class NodeGrpcGenerator : public grpc::protobuf::compiler::CodeGenerator {
const grpc::string& parameter,
grpc::protobuf::compiler::GeneratorContext* context,
grpc::string* error) const {
-
grpc_node_generator::Parameters generator_parameters;
generator_parameters.minimum_node_version = 4;
@@ -48,7 +47,8 @@ class NodeGrpcGenerator : public grpc::protobuf::compiler::CodeGenerator {
std::vector<grpc::string> param =
grpc_generator::tokenize(*parameter_string, "=");
if (param[0] == "minimum_node_version") {
- sscanf(param[1].c_str(), "%d", &generator_parameters.minimum_node_version);
+ sscanf(param[1].c_str(), "%d",
+ &generator_parameters.minimum_node_version);
} else {
*error = grpc::string("Unknown parameter: ") + *parameter_string;
return false;