diff options
author | Orgad Shaneh <orgad.shaneh@audiocodes.com> | 2014-04-30 22:54:29 +0300 |
---|---|---|
committer | Orgad Shaneh <orgads@gmail.com> | 2014-05-13 04:18:17 +0200 |
commit | 038f59836b52541223013048b810237f0b592e17 (patch) | |
tree | 7b944764bc9edff8b1bdbcc97a50c9865bba7177 /src/plugins/cpptools/cppqtstyleindenter.cpp | |
parent | cdcaca426941d9b00f7a902db5dbc9e434b8dbea (diff) | |
download | qt-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.cpp | 9 |
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; |