| 425 | } |
| 426 | |
| 427 | void FinalizeControlOutput(StringPiece name, OpDef* op_def, |
| 428 | std::vector<string>* errors) { |
| 429 | StringPiece orig(name); |
| 430 | |
| 431 | // Parse control output name. |
| 432 | StringPiece tmp_name; |
| 433 | if (!ConsumeControlOutName(&orig, &tmp_name)) { |
| 434 | errors->push_back(strings::StrCat("Trouble parsing 'name:'", |
| 435 | ControlOutError(orig, op_def->name()))); |
| 436 | } |
| 437 | |
| 438 | *op_def->add_control_output() = string(tmp_name.data(), tmp_name.size()); |
| 439 | } |
| 440 | |
| 441 | int num_leading_spaces(StringPiece s) { |
| 442 | size_t i = 0; |
no test coverage detected