Print a unified diff header for one hunk. The format is "@@ - , + , @@" where the left/right parts are omitted if unnecessary.
| 2666 | // "@@ -<left_start>,<left_length> +<right_start>,<right_length> @@" |
| 2667 | // where the left/right parts are omitted if unnecessary. |
| 2668 | void PrintHeader(std::ostream* ss) const { |
| 2669 | *ss << "@@ "; |
| 2670 | if (removes_) { |
| 2671 | *ss << "-" << left_start_ << "," << (removes_ + common_); |
| 2672 | } |
| 2673 | if (removes_ && adds_) { |
| 2674 | *ss << " "; |
| 2675 | } |
| 2676 | if (adds_) { |
| 2677 | *ss << "+" << right_start_ << "," << (adds_ + common_); |
| 2678 | } |
| 2679 | *ss << " @@\n"; |
| 2680 | } |
| 2681 | |
| 2682 | size_t left_start_, right_start_; |
| 2683 | size_t adds_, removes_, common_; |
nothing calls this directly
no outgoing calls
no test coverage detected