| 798 | } |
| 799 | |
| 800 | static int GetDistance(const CDiffTextBuffer& buf, const CEPoint& pt1, const CEPoint& pt2) |
| 801 | { |
| 802 | assert(pt1.y < pt2.y || (pt1.y == pt2.y && pt1.x <= pt2.x)); |
| 803 | int distance = 0; |
| 804 | for (int y = pt1.y; y <= pt2.y; ++y) |
| 805 | { |
| 806 | distance += buf.GetFullLineLength(y); |
| 807 | if (y == pt1.y) |
| 808 | distance -= pt1.x; |
| 809 | if (y == pt2.y) |
| 810 | distance -= buf.GetFullLineLength(y) - pt2.x; |
| 811 | } |
| 812 | return distance; |
| 813 | }; |
| 814 | |
| 815 | static CEPoint Advance(const CDiffTextBuffer& buf, const CEPoint& pt, int distance) |
| 816 | { |
no test coverage detected