Cast away type in some switch instructions to avoid compiler warnings.

git-svn-id: http://yate.null.ro/svn/yate/trunk@5887 acf43c95-373e-0410-b603-e72c3f656dc1
This commit is contained in:
paulc 2014-07-29 11:11:05 +00:00
parent 051d9ee217
commit 2a07a7217a
1 changed files with 8 additions and 10 deletions

View File

@ -971,14 +971,14 @@ bool JsCode::link()
if (!jmp || jmp->number() != lbl)
continue;
Opcode op = OpcNone;
switch (jmp->opcode()) {
case (Opcode)OpcJump:
switch ((int)jmp->opcode()) {
case OpcJump:
op = (Opcode)OpcJRel;
break;
case (Opcode)OpcJumpTrue:
case OpcJumpTrue:
op = (Opcode)OpcJRelTrue;
break;
case (Opcode)OpcJumpFalse:
case OpcJumpFalse:
op = (Opcode)OpcJRelFalse;
break;
default:
@ -1363,8 +1363,8 @@ bool JsCode::getInstruction(ParsePoint& expr, char stop, GenObject* nested)
expr.m_foundSep = 0;
ParsePoint saved = expr;
Opcode op = ExpEvaluator::getOperator(expr,s_instr);
switch ((JsOpcode)op) {
case (JsOpcode)OpcNone:
switch ((int)op) {
case OpcNone:
return false;
case OpcThrow:
if (!runCompile(expr))
@ -1439,8 +1439,6 @@ bool JsCode::getInstruction(ParsePoint& expr, char stop, GenObject* nested)
return parseTry(expr,nested);
case OpcFuncDef:
return parseFuncDef(expr,!nested);
default:
break;
}
return true;
}
@ -1877,7 +1875,7 @@ const char* JsCode::getOperator(Opcode oper) const
int JsCode::getPrecedence(ExpEvaluator::Opcode oper) const
{
switch (oper) {
switch ((int)oper) {
case OpcEqIdentity:
case OpcNeIdentity:
return 40;
@ -2069,7 +2067,7 @@ bool JsCode::runOperation(ObjList& stack, const ExpOperation& oper, GenObject* c
JsRunner* sr = static_cast<JsRunner*>(context);
if (sr && sr->tracing())
sr->tracePrep(oper);
switch ((JsOpcode)oper.opcode()) {
switch ((int)oper.opcode()) {
case OpcEqIdentity:
case OpcNeIdentity:
{