diff options
author | Orgad Shaneh <orgad.shaneh@audiocodes.com> | 2013-07-17 00:01:45 +0300 |
---|---|---|
committer | Orgad Shaneh <orgads@gmail.com> | 2013-07-17 11:11:25 +0200 |
commit | ad9e7ccab6e8476c0cb478ea2e4f13354dc21635 (patch) | |
tree | 9c67e7cfec7e7d0603e9279de9227cdef1cac530 /src/libs/cplusplus/ExpressionUnderCursor.cpp | |
parent | c67f7f63497b321f42ee0081f29b7e3804023a10 (diff) | |
download | qt-creator-ad9e7ccab6e8476c0cb478ea2e4f13354dc21635.tar.gz |
Fix coding style for else statements
Change-Id: I1309db70e98d678e150388c76ce665e988fdf081
Reviewed-by: Eike Ziller <eike.ziller@digia.com>
Diffstat (limited to 'src/libs/cplusplus/ExpressionUnderCursor.cpp')
-rw-r--r-- | src/libs/cplusplus/ExpressionUnderCursor.cpp | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/src/libs/cplusplus/ExpressionUnderCursor.cpp b/src/libs/cplusplus/ExpressionUnderCursor.cpp index df002672ee..35e16ab0c1 100644 --- a/src/libs/cplusplus/ExpressionUnderCursor.cpp +++ b/src/libs/cplusplus/ExpressionUnderCursor.cpp @@ -263,19 +263,20 @@ int ExpressionUnderCursor::startOfFunctionCall(const QTextCursor &cursor) const forever { const Token &tk = scanner[index - 1]; - if (tk.is(T_EOF_SYMBOL)) + if (tk.is(T_EOF_SYMBOL)) { break; - else if (tk.is(T_LPAREN)) + } else if (tk.is(T_LPAREN)) { return scanner.startPosition() + tk.begin(); - else if (tk.is(T_RPAREN)) { + } else if (tk.is(T_RPAREN)) { int matchingBrace = scanner.startOfMatchingBrace(index); if (matchingBrace == index) // If no matching brace found return -1; index = matchingBrace; - } else + } else { --index; + } } return -1; |