Commit 038f5983 authored by Orgad Shaneh's avatar Orgad Shaneh Committed by Orgad Shaneh
Browse files

CppTools: Minor cleanup



Replace repetitive condition with switch-case statement.

Change-Id: Ib022d6970257d054f47229b70c1c0db4b6f2e80c
Reviewed-by: default avatarNikolai Kosjar <nikolai.kosjar@digia.com>
parent cdcaca42
...@@ -53,10 +53,11 @@ CppQtStyleIndenter::~CppQtStyleIndenter() ...@@ -53,10 +53,11 @@ CppQtStyleIndenter::~CppQtStyleIndenter()
bool CppQtStyleIndenter::isElectricCharacter(const QChar &ch) const bool CppQtStyleIndenter::isElectricCharacter(const QChar &ch) const
{ {
if (ch == QLatin1Char('{') || switch (ch.toLatin1()) {
ch == QLatin1Char('}') || case '{':
ch == QLatin1Char(':') || case '}':
ch == QLatin1Char('#')) { case ':':
case '#':
return true; return true;
} }
return false; return false;
......
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