Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
Utilities
Kate
Commits
7a2ec469
Commit
7a2ec469
authored
Feb 27, 2021
by
Christoph Cullmann
🐮
Browse files
try to fix Windows compile, no C++17
parent
ffd821d3
Changes
1
Hide whitespace changes
Inline
Side-by-side
addons/project/git/gitdiff.cpp
View file @
7a2ec469
...
...
@@ -259,9 +259,9 @@ QList<DiffHunk *> parseHunks(VcsDiff &diff)
m
=
HUNK_HEADER_RE
->
match
(
curln
);
if
(
!
m
.
hasMatch
())
continue
;
auto
[
old
Start
,
oldCount
]
=
parseRange
(
m
.
captured
(
1
));
auto
[
new
Start
,
newCount
]
=
parseRange
(
m
.
captured
(
2
));
auto
heading
=
m
.
captured
(
3
);
const
auto
old
Range
=
parseRange
(
m
.
captured
(
1
));
const
auto
new
Range
=
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
{
old
Start
,
oldCount
,
newStart
,
newCount
,
firstLineIdx
,
curSrcFileName
,
curTgtFileName
,
heading
,
hunkLines
};
ret
<<
new
DiffHunk
{
old
Range
.
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
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment