Utils: Simplify

bugprone-branch-clone
readability-simplify-boolean-expr

Change-Id: I75ad6118275ad9231f21b578567c3c042414263b
Reviewed-by: hjk <hjk@qt.io>
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
This commit is contained in:
Nikolai Kosjar
2019-10-31 15:56:20 +01:00
parent eabc5e2bdd
commit 16e61cdf82
6 changed files with 16 additions and 38 deletions

View File

@@ -236,16 +236,12 @@ static int cleanupSemanticsScore(const QString &text1, const QString &text2)
static bool isWhitespace(const QChar &c)
{
if (c == ' ' || c == '\t')
return true;
return false;
return c == ' ' || c == '\t';
}
static bool isNewLine(const QChar &c)
{
if (c == '\n')
return true;
return false;
return c == '\n';
}
/*
@@ -719,9 +715,7 @@ static bool diffWithWhitespaceExpandedInEqualities(const QList<Diff> &leftInput,
return false;
*rightOutput = decodeExpandedWhitespace(rightDiffList,
commonRightCodeMap, &ok);
if (!ok)
return false;
return true;
return ok;
}
static void appendWithEqualitiesSquashed(const QList<Diff> &leftInput,