diff options
author | rubidium <rubidium@openttd.org> | 2014-09-16 20:06:28 +0000 |
---|---|---|
committer | rubidium <rubidium@openttd.org> | 2014-09-16 20:06:28 +0000 |
commit | 12bd7532ba8ac410bf596359d36c823b2df77734 (patch) | |
tree | e479f9bec144a3d37ffa62e6882432dcae32905c /src | |
parent | 5cec030d4d38faa862f97565470f998635fb7e02 (diff) | |
download | openttd-12bd7532ba8ac410bf596359d36c823b2df77734.tar.xz |
(svn r26833) -Fix [Squirrel]: remove a few bits of dead code
Diffstat (limited to 'src')
-rw-r--r-- | src/3rdparty/squirrel/squirrel/sqapi.cpp | 3 | ||||
-rw-r--r-- | src/3rdparty/squirrel/squirrel/sqcompiler.cpp | 5 |
2 files changed, 2 insertions, 6 deletions
diff --git a/src/3rdparty/squirrel/squirrel/sqapi.cpp b/src/3rdparty/squirrel/squirrel/sqapi.cpp index 37d4f0c79..117e06b93 100644 --- a/src/3rdparty/squirrel/squirrel/sqapi.cpp +++ b/src/3rdparty/squirrel/squirrel/sqapi.cpp @@ -988,9 +988,6 @@ SQRESULT sq_call(HSQUIRRELVM v,SQInteger params,SQBool retval,SQBool raiseerror, v->Pop(params); return SQ_ERROR; } - if(!v->_suspended) - v->Pop(params); - return sq_throwerror(v,"call failed"); } SQRESULT sq_suspendvm(HSQUIRRELVM v) diff --git a/src/3rdparty/squirrel/squirrel/sqcompiler.cpp b/src/3rdparty/squirrel/squirrel/sqcompiler.cpp index 53775e183..bafbe42d9 100644 --- a/src/3rdparty/squirrel/squirrel/sqcompiler.cpp +++ b/src/3rdparty/squirrel/squirrel/sqcompiler.cpp @@ -429,7 +429,7 @@ public: void LogicalOrExp() { LogicalAndExp(); - for(;;) if(_token == TK_OR) { + if(_token == TK_OR) { SQInteger first_exp = _fs->PopTarget(); SQInteger trg = _fs->PushTarget(); _fs->AddInstruction(_OP_OR, trg, 0, first_exp, 0); @@ -441,8 +441,7 @@ public: if(trg != second_exp) _fs->AddInstruction(_OP_MOVE, trg, second_exp); _fs->SnoozeOpt(); _fs->SetIntructionParam(jpos, 1, (_fs->GetCurrentPos() - jpos)); - break; - }else return; + } } void LogicalAndExp() { |