diff options
author | Thiago Macieira <thiago.macieira@intel.com> | 2012-08-26 17:32:08 +0200 |
---|---|---|
committer | Qt by Nokia <qt-info@nokia.com> | 2012-09-13 19:52:55 +0200 |
commit | 75b9cd92dc5291ce12d8d609c5d721246044ffa0 (patch) | |
tree | bfbff24799be8b110677ffbd27410926857efd60 /src | |
parent | 50813c8cc36716a579b2e09d4dae71d2f23402c8 (diff) |
Add a Q_UNREACHABLE to improve code generation a little
The code can't reach there anyway, so let's help the compiler out a
little.
Change-Id: Icee6ebe426c1116a7baaf2c5766c6d8f8276f3ac
Reviewed-by: Roberto Raggi <roberto.raggi@nokia.com>
Diffstat (limited to 'src')
-rw-r--r-- | src/qml/qml/qqmlcompileddata.cpp | 1 | ||||
-rw-r--r-- | src/qml/qml/qqmlvme.cpp | 1 |
2 files changed, 2 insertions, 0 deletions
diff --git a/src/qml/qml/qqmlcompileddata.cpp b/src/qml/qml/qqmlcompileddata.cpp index c2ca079779..4b8e9ffee3 100644 --- a/src/qml/qml/qqmlcompileddata.cpp +++ b/src/qml/qml/qqmlcompileddata.cpp @@ -223,6 +223,7 @@ QQmlInstruction::Type QQmlCompiledData::instructionType(const QQmlInstruction *i return QQmlInstruction::I; FOR_EACH_QML_INSTR(QML_CHECK_INSTR_CODE) + Q_UNREACHABLE(); Q_ASSERT_X(false, Q_FUNC_INFO, "Invalid instruction address"); return static_cast<QQmlInstruction::Type>(0); # undef QML_CHECK_INSTR_CODE diff --git a/src/qml/qml/qqmlvme.cpp b/src/qml/qml/qqmlvme.cpp index 9b550c5eaf..2f7c9c2aaa 100644 --- a/src/qml/qml/qqmlvme.cpp +++ b/src/qml/qml/qqmlvme.cpp @@ -1085,6 +1085,7 @@ QObject *QQmlVME::run(QList<QQmlError> *errors, // nothing to do #else default: + Q_UNREACHABLE(); qFatal("QQmlCompiledData: Internal error - unknown instruction %d", genericInstr->common.instructionType); break; } |