Do not depend on c++17

This commit is contained in:
Tomaz Canabrava
2020-04-16 17:07:14 +02:00
committed by Kurt Hindenburg
parent febe306f70
commit ec379a2730

View File

@@ -327,11 +327,16 @@ void RegExpFilter::process()
QRegularExpressionMatchIterator iterator(_searchText.globalMatch(*text));
while (iterator.hasNext()) {
QRegularExpressionMatch match(iterator.next());
auto [startLine, startColumn] = getLineColumn(match.capturedStart());
auto [endLine, endColumn] = getLineColumn(match.capturedEnd());
std::pair<int, int> start = getLineColumn(match.capturedStart());
std::pair<int, int> end = getLineColumn(match.capturedEnd());
QSharedPointer<Filter::HotSpot> spot(
newHotSpot(start.first, start.second,
end.first, end.second,
match.capturedTexts()
)
);
QSharedPointer<Filter::HotSpot> spot(newHotSpot(startLine, startColumn,
endLine, endColumn, match.capturedTexts()));
if (spot == nullptr) {
continue;
}