[muparser] Fix "enumeration value not handled in switch" warning

It's unclear whether the default behavior is ever executed. Add an
assertion to find out the hard way.
This commit is contained in:
ridiculousfish 2017-11-22 10:51:35 -08:00
parent a7f6105497
commit fc110d2c0e

View file

@ -775,6 +775,9 @@ void ParserBase::ApplyFunc(ParserStack<token_type> &a_stOpt, ParserStack<token_t
m_vRPN.AddFun(funTok.GetFuncAddr(),
(funTok.GetArgCount() == -1) ? -iArgNumerical : iArgNumerical);
break;
default:
assert(0 && "Unexpected function token");
break;
}
// Push dummy value representing the function result to the stack