cleanup formatting with clang_format_code.sh

pull/15225/head
Ben Sykes 7 years ago
parent 1de3f4ae8d
commit 86d65ce290
  1. 9
      src/compiler/node_generator.cc
  2. 3
      src/compiler/node_generator.h
  3. 4
      src/compiler/node_plugin.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);

@ -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

@ -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;

Loading…
Cancel
Save