diff options
author | Christian Kandeler <christian.kandeler@qt.io> | 2020-07-06 15:30:14 +0200 |
---|---|---|
committer | Christian Kandeler <christian.kandeler@qt.io> | 2020-07-06 14:11:02 +0000 |
commit | 8bd6453d767f6b658d5b91240eca307c767ca919 (patch) | |
tree | addab387e7deb6a739a7772949a0a8505348b518 /src/plugins/cpptools | |
parent | 8bc01aee7559689f1d2c2bfe9a312b351beb09f0 (diff) |
CppTools: Fix warning about fall-through
Change-Id: I6984265c4678b70e2684908b144560b6fbd542dd
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
Diffstat (limited to 'src/plugins/cpptools')
-rw-r--r-- | src/plugins/cpptools/cppcodeformatter.cpp | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/src/plugins/cpptools/cppcodeformatter.cpp b/src/plugins/cpptools/cppcodeformatter.cpp index d98b0022ec..2f71be2f65 100644 --- a/src/plugins/cpptools/cppcodeformatter.cpp +++ b/src/plugins/cpptools/cppcodeformatter.cpp @@ -200,10 +200,11 @@ void CodeFormatter::recalculateStateAfter(const QTextBlock &block) } break; case T_ARROW: // Trailing return type? - if (m_currentState.at(m_currentState.size() - 2).type == declaration_start) { + if (m_currentState.at(m_currentState.size() - 2).type == declaration_start) leave(); - break; - } + else + tryExpression(); + break; default: tryExpression(); break; } break; |