Commit db3655dc authored by Laurent Montel's avatar Laurent Montel 😁
Browse files

Minor optimization

parent 0a854708
Pipeline #55908 passed with stage
in 55 minutes and 51 seconds
......@@ -32,6 +32,7 @@ void GrammalecteResultJob::start()
mProcess->setProgram(mPythonPath);
QStringList args;
args.reserve(6);
args << mGrammarlecteCliPath;
if (!mArguments.isEmpty()) {
args << QStringLiteral("-on") << mArguments;
......@@ -114,7 +115,7 @@ void GrammalecteResultJob::setPythonPath(const QString &pythonPath)
static bool hasNotEmptyText(const QString &text)
{
for (int i = 0; i < text.length(); ++i) {
for (int i = 0, total = text.length(); i < total; ++i) {
if (!text.at(i).isSpace()) {
return true;
}
......
Markdown is supported
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