MCPcopy Create free account
hub / github.com/KDE/kdevelop / diffLineToHunkLine

Method diffLineToHunkLine

kdevplatform/vcs/vcsdiff.cpp:71–71  ·  view source on GitHub ↗

* Returns the index of the line within the hunk * * @param diffLineIdx the 0-based index of the line in the diff * * @note assumes that the line is contained within the hunk * @note if the line is a header line, -1 is returned; otherwise the returned * number is the index of the line in the `lines` list */

Source from the content-addressed store, hash-verified

69 * number is the index of the line in the `lines` list
70 */
71 int diffLineToHunkLine(uint diffLineIdx) const { return diffLineIdx - (headingLineIdx + 1); }
72
73 /**
74 * A helper method to construct a hunk header from the provided info

Callers 1

mapDiffLineMethod · 0.80

Calls

no outgoing calls

Tested by

no test coverage detected