CppTools: Minor cleanup

Replace repetitive condition with switch-case statement.

Change-Id: Ib022d6970257d054f47229b70c1c0db4b6f2e80c
Reviewed-by: Nikolai Kosjar <nikolai.kosjar@digia.com>
This commit is contained in:
Orgad Shaneh
2014-04-30 22:54:29 +03:00
committed by Orgad Shaneh
parent cdcaca4269
commit 038f59836b

View File

@@ -53,10 +53,11 @@ CppQtStyleIndenter::~CppQtStyleIndenter()
bool CppQtStyleIndenter::isElectricCharacter(const QChar &ch) const
{
if (ch == QLatin1Char('{') ||
ch == QLatin1Char('}') ||
ch == QLatin1Char(':') ||
ch == QLatin1Char('#')) {
switch (ch.toLatin1()) {
case '{':
case '}':
case ':':
case '#':
return true;
}
return false;