summaryrefslogtreecommitdiff
path: root/src/plugins/cpptools/cppqtstyleindenter.cpp
diff options
context:
space:
mode:
authorOrgad Shaneh <orgad.shaneh@audiocodes.com>2014-04-30 22:54:29 +0300
committerOrgad Shaneh <orgads@gmail.com>2014-05-13 04:18:17 +0200
commit038f59836b52541223013048b810237f0b592e17 (patch)
tree7b944764bc9edff8b1bdbcc97a50c9865bba7177 /src/plugins/cpptools/cppqtstyleindenter.cpp
parentcdcaca426941d9b00f7a902db5dbc9e434b8dbea (diff)
downloadqt-creator-038f59836b52541223013048b810237f0b592e17.tar.gz
CppTools: Minor cleanup
Replace repetitive condition with switch-case statement. Change-Id: Ib022d6970257d054f47229b70c1c0db4b6f2e80c Reviewed-by: Nikolai Kosjar <nikolai.kosjar@digia.com>
Diffstat (limited to 'src/plugins/cpptools/cppqtstyleindenter.cpp')
-rw-r--r--src/plugins/cpptools/cppqtstyleindenter.cpp9
1 files changed, 5 insertions, 4 deletions
diff --git a/src/plugins/cpptools/cppqtstyleindenter.cpp b/src/plugins/cpptools/cppqtstyleindenter.cpp
index f687a21618..ebb845390f 100644
--- a/src/plugins/cpptools/cppqtstyleindenter.cpp
+++ b/src/plugins/cpptools/cppqtstyleindenter.cpp
@@ -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;