WSL/SLF GitLab Repository

Commit fe5591d4 authored by Mathias Bavay's avatar Mathias Bavay
Browse files

More warnings fixes

parent e3a358ef
......@@ -130,8 +130,8 @@ void INISyntaxHighlighter::highlightBlock(const QString &text)
for (const HighlightingRule &rule : qAsConst(rules_)) {
QRegularExpressionMatchIterator mit( rule.pattern.globalMatch(text) );
while (mit.hasNext()) { //run trough regex matches and set the stored formats
QRegularExpressionMatch match = mit.next();
setFormat(match.capturedStart(), match.capturedLength(), rule.format);
QRegularExpressionMatch match( mit.next() );
setFormat(static_cast<int>(match.capturedStart()), static_cast<int>(match.capturedLength()), rule.format);
}
}
}
......@@ -194,8 +194,8 @@ void XMLSyntaxHighlighter::highlightBlock(const QString &text)
for (const HighlightingRule &rule : qAsConst(rules_)) {
QRegularExpressionMatchIterator mit( rule.pattern.globalMatch(text) );
while (mit.hasNext()) { //run trough regex matches and set the stored formats
QRegularExpressionMatch match = mit.next();
setFormat(match.capturedStart(), match.capturedLength(), rule.format);
QRegularExpressionMatch match( mit.next() );
setFormat(static_cast<int>(match.capturedStart()), static_cast<int>(match.capturedLength()), rule.format);
}
}
}
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