forked from qt-creator/qt-creator
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:
committed by
Orgad Shaneh
parent
cdcaca4269
commit
038f59836b
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user