Skip to content

Commit

Permalink
Small compiler optimization.
Browse files Browse the repository at this point in the history
  • Loading branch information
nicolasnoble committed Mar 27, 2015
1 parent a8c7c20 commit d48a969
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions src/compiler/cpp_plugin.cc
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,11 @@ class CppGrpcGenerator : public grpc::protobuf::compiler::CodeGenerator {
return false;
}

if (file->service_count() == 0) {
// No services. Do nothing.
return true;
}

grpc_cpp_generator::Parameters generator_parameters;

if (!parameter.empty()) {
Expand Down

0 comments on commit d48a969

Please sign in to comment.