mirror of
https://github.com/OpenTTD/OpenTTD.git
synced 2025-08-24 23:19:09 +00:00
(svn r17283) -Cleanup [Squirrel]: remove a few unneeded changes to squirrel code
This commit is contained in:
1
src/3rdparty/squirrel/samples/ackermann.nut
vendored
1
src/3rdparty/squirrel/samples/ackermann.nut
vendored
@@ -20,3 +20,4 @@ if(ARGS.len()!=0) {
|
|||||||
}
|
}
|
||||||
print("n="+n+"\n");
|
print("n="+n+"\n");
|
||||||
print("Ack(3,"+ n+ "):"+ Ack(3, n));
|
print("Ack(3,"+ n+ "):"+ Ack(3, n));
|
||||||
|
|
||||||
|
2
src/3rdparty/squirrel/sqstdlib/sqstdrex.cpp
vendored
2
src/3rdparty/squirrel/sqstdlib/sqstdrex.cpp
vendored
@@ -558,12 +558,12 @@ SQRex *sqstd_rex_compile(const SQChar *pattern,const SQChar **error)
|
|||||||
#endif
|
#endif
|
||||||
exp->_matches = (SQRexMatch *) sq_malloc(exp->_nsubexpr * sizeof(SQRexMatch));
|
exp->_matches = (SQRexMatch *) sq_malloc(exp->_nsubexpr * sizeof(SQRexMatch));
|
||||||
memset(exp->_matches,0,exp->_nsubexpr * sizeof(SQRexMatch));
|
memset(exp->_matches,0,exp->_nsubexpr * sizeof(SQRexMatch));
|
||||||
return exp;
|
|
||||||
}
|
}
|
||||||
catch (...) {
|
catch (...) {
|
||||||
sqstd_rex_free(exp);
|
sqstd_rex_free(exp);
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
|
return exp;
|
||||||
}
|
}
|
||||||
|
|
||||||
void sqstd_rex_free(SQRex *exp)
|
void sqstd_rex_free(SQRex *exp)
|
||||||
|
2
src/3rdparty/squirrel/squirrel/sqapi.cpp
vendored
2
src/3rdparty/squirrel/squirrel/sqapi.cpp
vendored
@@ -834,7 +834,7 @@ SQRESULT sq_getdelegate(HSQUIRRELVM v,SQInteger idx)
|
|||||||
}
|
}
|
||||||
v->Push(SQObjectPtr(_delegable(self)->_delegate));
|
v->Push(SQObjectPtr(_delegable(self)->_delegate));
|
||||||
break;
|
break;
|
||||||
default: return sq_throwerror(v,_SC("wrong type"));
|
default: return sq_throwerror(v,_SC("wrong type")); break;
|
||||||
}
|
}
|
||||||
return SQ_OK;
|
return SQ_OK;
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user