From 0659be33758ad6b1f5d63c034d729d1fef97cdf9 Mon Sep 17 00:00:00 2001 From: dismine Date: Wed, 18 Jun 2014 14:10:26 +0300 Subject: [PATCH] Refactoring. --HG-- branch : feature --- src/libs/qmuparser/qmuparser.pro | 2 +- src/libs/qmuparser/qmuparserbase.cpp | 90 ------------------------ src/libs/qmuparser/qmuparserbytecode.cpp | 69 ------------------ 3 files changed, 1 insertion(+), 160 deletions(-) diff --git a/src/libs/qmuparser/qmuparser.pro b/src/libs/qmuparser/qmuparser.pro index 4a46c8b68..eab501172 100644 --- a/src/libs/qmuparser/qmuparser.pro +++ b/src/libs/qmuparser/qmuparser.pro @@ -80,7 +80,7 @@ CONFIG(debug, debug|release){ -Wformat=2 -Wimport \ -Winvalid-pch -Wunsafe-loop-optimizations -Wlong-long -Wmissing-format-attribute \ -Wmissing-include-dirs -Wpacked -Wredundant-decls -Winline \ - -Wswitch-default -Wswitch-enum -Wuninitialized -Wvariadic-macros \ + -Wswitch-default -Wuninitialized -Wvariadic-macros \ -Wlogical-op -Wnoexcept -Wmissing-noreturn -Wpointer-arith\ -Wstrict-null-sentinel -Wstrict-overflow=5 -Wundef -Wno-unused -gdwarf-3 \ -ftrapv diff --git a/src/libs/qmuparser/qmuparserbase.cpp b/src/libs/qmuparser/qmuparserbase.cpp index b6941a2b4..0b2bb27df 100644 --- a/src/libs/qmuparser/qmuparserbase.cpp +++ b/src/libs/qmuparser/qmuparserbase.cpp @@ -875,96 +875,6 @@ void QmuParserBase::ApplyFunc( QStack &a_stOpt, QStack & m_vRPN.AddFun(funTok.GetFuncAddr(), (funTok.GetArgCount()==-1) ? -iArgNumerical : iArgNumerical); break; - case cmLE: - Q_UNREACHABLE(); - break; - case cmGE: - Q_UNREACHABLE(); - break; - case cmNEQ: - Q_UNREACHABLE(); - break; - case cmEQ: - Q_UNREACHABLE(); - break; - case cmLT: - Q_UNREACHABLE(); - break; - case cmGT: - Q_UNREACHABLE(); - break; - case cmADD: - Q_UNREACHABLE(); - break; - case cmSUB: - Q_UNREACHABLE(); - break; - case cmMUL: - Q_UNREACHABLE(); - break; - case cmDIV: - Q_UNREACHABLE(); - break; - case cmPOW: - Q_UNREACHABLE(); - break; - case cmLAND: - Q_UNREACHABLE(); - break; - case cmLOR: - Q_UNREACHABLE(); - break; - case cmASSIGN: - Q_UNREACHABLE(); - break; - case cmBO: - Q_UNREACHABLE(); - break; - case cmBC: - Q_UNREACHABLE(); - break; - case cmIF: - Q_UNREACHABLE(); - break; - case cmELSE: - Q_UNREACHABLE(); - break; - case cmENDIF: - Q_UNREACHABLE(); - break; - case cmARG_SEP: - Q_UNREACHABLE(); - break; - case cmVAR: - Q_UNREACHABLE(); - break; - case cmVAL: - Q_UNREACHABLE(); - break; - case cmVARPOW2: - Q_UNREACHABLE(); - break; - case cmVARPOW3: - Q_UNREACHABLE(); - break; - case cmVARPOW4: - Q_UNREACHABLE(); - break; - case cmVARMUL: - Q_UNREACHABLE(); - break; - case cmPOW2: - Q_UNREACHABLE(); - break; - case cmSTRING: - Q_UNREACHABLE(); - break; - case cmEND: - Q_UNREACHABLE(); - break; - case cmUNKNOWN: - Q_UNREACHABLE(); - break; default: break; } diff --git a/src/libs/qmuparser/qmuparserbytecode.cpp b/src/libs/qmuparser/qmuparserbytecode.cpp index 439693911..2e39f9198 100644 --- a/src/libs/qmuparser/qmuparserbytecode.cpp +++ b/src/libs/qmuparser/qmuparserbytecode.cpp @@ -207,75 +207,6 @@ void QmuParserByteCode::ConstantFolding(ECmdCode a_Oprt) x = qPow(x, y); m_vRPN.pop_back(); break; - case cmASSIGN: - Q_UNREACHABLE(); - break; - case cmBO: - Q_UNREACHABLE(); - break; - case cmBC: - Q_UNREACHABLE(); - break; - case cmIF: - Q_UNREACHABLE(); - break; - case cmELSE: - Q_UNREACHABLE(); - break; - case cmENDIF: - Q_UNREACHABLE(); - break; - case cmARG_SEP: - Q_UNREACHABLE(); - break; - case cmVAR: - Q_UNREACHABLE(); - break; - case cmVAL: - Q_UNREACHABLE(); - break; - case cmVARPOW2: - Q_UNREACHABLE(); - break; - case cmVARPOW3: - Q_UNREACHABLE(); - break; - case cmVARPOW4: - Q_UNREACHABLE(); - break; - case cmVARMUL: - Q_UNREACHABLE(); - break; - case cmPOW2: - Q_UNREACHABLE(); - break; - case cmFUNC: - Q_UNREACHABLE(); - break; - case cmFUNC_STR: - Q_UNREACHABLE(); - break; - case cmFUNC_BULK: - Q_UNREACHABLE(); - break; - case cmSTRING: - Q_UNREACHABLE(); - break; - case cmOPRT_BIN: - Q_UNREACHABLE(); - break; - case cmOPRT_POSTFIX: - Q_UNREACHABLE(); - break; - case cmOPRT_INFIX: - Q_UNREACHABLE(); - break; - case cmEND: - Q_UNREACHABLE(); - break; - case cmUNKNOWN: - Q_UNREACHABLE(); - break; default: break; } // switch opcode