Commit 3c78cd08 authored by Christoph Cullmann's avatar Christoph Cullmann 🐮
Browse files

avoid string re-allocations if possible

parent b255405b
...@@ -75,12 +75,12 @@ void SearchDiskFiles::run() ...@@ -75,12 +75,12 @@ void SearchDiskFiles::run()
QVector<KateSearchMatch> SearchDiskFiles::searchSingleLineRegExp(QFile &file) QVector<KateSearchMatch> SearchDiskFiles::searchSingleLineRegExp(QFile &file)
{ {
QTextStream stream(&file); QTextStream stream(&file);
QString line;
int i = 0; int i = 0;
int column; int column;
QRegularExpressionMatch match; QRegularExpressionMatch match;
QVector<KateSearchMatch> matches; QVector<KateSearchMatch> matches;
while (!(line = stream.readLine()).isNull()) { QString line;
while (stream.readLineInto(&line)) {
if (m_worklist.isCanceled()) { if (m_worklist.isCanceled()) {
break; break;
} }
......
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