forked from qt-creator/qt-creator
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:
@@ -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,
|
||||
|
||||
Reference in New Issue
Block a user