| 518 | } |
| 519 | |
| 520 | LineType RowScratchRegisters::GetLineType() const { |
| 521 | if (hypotheses_.empty()) |
| 522 | return LT_UNKNOWN; |
| 523 | bool has_start = false; |
| 524 | bool has_body = false; |
| 525 | for (int i = 0; i < hypotheses_.size(); i++) { |
| 526 | switch (hypotheses_[i].ty) { |
| 527 | case LT_START: has_start = true; break; |
| 528 | case LT_BODY: has_body = true; break; |
| 529 | default: |
| 530 | tprintf("Encountered bad value in hypothesis list: %c\n", |
| 531 | hypotheses_[i].ty); |
| 532 | break; |
| 533 | } |
| 534 | } |
| 535 | if (has_start && has_body) |
| 536 | return LT_MULTIPLE; |
| 537 | return has_start ? LT_START : LT_BODY; |
| 538 | } |
| 539 | |
| 540 | LineType RowScratchRegisters::GetLineType(const ParagraphModel *model) const { |
| 541 | if (hypotheses_.empty()) |
no test coverage detected