Review comments

This commit is contained in:
jpirnay
2026-02-27 11:53:19 +01:00
parent 5e62dd79cd
commit 5764e22b82
2 changed files with 13 additions and 3 deletions
+6 -2
View File
@@ -55,9 +55,13 @@ class ChapterXPathIndexer {
* Parse DocFragment index from KOReader-style path segment:
* /body/DocFragment[N]/body/...
*
* KOReader uses 1-based DocFragment indices; N is converted to the 0-based
* spine index stored in outSpineIndex (i.e. outSpineIndex = N - 1).
*
* @param xpath KOReader XPath
* @param outSpineIndex Parsed DocFragment index (0-based)
* @return true when DocFragment[N] exists and N is valid integer >= 0
* @param outSpineIndex 0-based spine index derived from DocFragment[N]
* @return true when DocFragment[N] exists and N is a valid integer >= 1
* (converted to 0-based outSpineIndex); false otherwise
*/
static bool tryExtractSpineIndexFromXPath(const std::string& xpath, int& outSpineIndex);
};