Skip to content

Commit

Permalink
Removing range-based for loop.
Browse files Browse the repository at this point in the history
  • Loading branch information
nicolasnoble committed Mar 25, 2015
1 parent 375a82b commit 1e47514
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions src/compiler/cpp_plugin.cc
Original file line number Diff line number Diff line change
Expand Up @@ -63,13 +63,15 @@ class CppGrpcGenerator : public grpc::protobuf::compiler::CodeGenerator {
if (!parameter.empty()) {
std::vector<grpc::string> parameters_list =
grpc_generator::tokenize(parameter, ",");
for (auto &parameter_string: parameters_list) {
for (auto parameter_string = parameters_list.begin();
parameter_string != parameters_list.end();
parameter_string++) {
std::vector<grpc::string> param =
grpc_generator::tokenize(parameter_string, "=");
grpc_generator::tokenize(*parameter_string, "=");
if (param[0] == "services_namespace") {
generator_parameters.services_namespace = param[1];
} else {
*error = grpc::string("Unknown parameter: ") + parameter_string;
*error = grpc::string("Unknown parameter: ") + *parameter_string;
return false;
}
}
Expand Down

0 comments on commit 1e47514

Please sign in to comment.