Commit 7a2ec469 authored by Christoph Cullmann's avatar Christoph Cullmann 🐮
Browse files

try to fix Windows compile, no C++17

parent ffd821d3
......@@ -259,9 +259,9 @@ QList<DiffHunk *> parseHunks(VcsDiff &diff)
m = HUNK_HEADER_RE->match(curln);
if (!m.hasMatch())
auto [oldStart, oldCount] = parseRange(m.captured(1));
auto [newStart, newCount] = parseRange(m.captured(2));
auto heading = m.captured(3);
const auto oldRange = parseRange(m.captured(1));
const auto newRange = parseRange(m.captured(2));
const auto heading = m.captured(3);
uint firstLineIdx = lineNo;
QStringList hunkLines;
while (lines.hasNext() && (CONFLICT_START_RE->match(lines.peekNext()).hasMatch() || !META_LINE_RE->match(lines.peekNext()).hasMatch())) {
......@@ -285,7 +285,7 @@ QList<DiffHunk *> parseHunks(VcsDiff &diff)
// The number of filenames present in the diff should match the number
// of hunks
ret << new DiffHunk{oldStart, oldCount, newStart, newCount, firstLineIdx, curSrcFileName, curTgtFileName, heading, hunkLines};
ret << new DiffHunk{oldRange.first, oldRange.second, newRange.first, newRange.second, firstLineIdx, curSrcFileName, curTgtFileName, heading, hunkLines};
// If the diff ends with a newline, for the last hunk, when splitting into lines above
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment