mirror of
https://github.com/libretro/scummvm.git
synced 2025-01-05 17:20:30 +00:00
TWP: Fix not all members of a class are initialized in squirrel. PVS-Studio V730
This commit is contained in:
parent
2e823bc6f6
commit
df0d1cb8d4
@ -12,7 +12,7 @@ enum SQOuterType {
|
||||
struct SQOuterVar
|
||||
{
|
||||
|
||||
SQOuterVar(){}
|
||||
SQOuterVar() : _type(otLOCAL) {}
|
||||
SQOuterVar(const SQObjectPtr &name,const SQObjectPtr &src,SQOuterType t)
|
||||
{
|
||||
_name = name;
|
||||
|
@ -108,7 +108,7 @@ struct SQInstructionDesc {
|
||||
|
||||
struct SQInstruction
|
||||
{
|
||||
SQInstruction(){};
|
||||
SQInstruction() : _arg1(0), op(0), _arg0(0), _arg2(0), _arg3(0){}
|
||||
SQInstruction(SQOpcode _op,SQInteger a0=0,SQInteger a1=0,SQInteger a2=0,SQInteger a3=0)
|
||||
{ op = (unsigned char)_op;
|
||||
_arg0 = (unsigned char)a0;_arg1 = (SQInt32)a1;
|
||||
|
@ -14,6 +14,13 @@
|
||||
|
||||
SQSharedState::SQSharedState()
|
||||
{
|
||||
_metamethods = NULL;
|
||||
_systemstrings = NULL;
|
||||
_types = NULL;
|
||||
_stringtable = NULL;
|
||||
_gc_chain = NULL;
|
||||
_scratchpad = NULL;
|
||||
_scratchpadsize = 0;
|
||||
_compilererrorhandler = NULL;
|
||||
_printfunc = NULL;
|
||||
_errorfunc = NULL;
|
||||
|
@ -13,7 +13,10 @@ inline SQHash _hashstr (const SQChar *s, size_t l)
|
||||
|
||||
struct SQString : public SQRefCounted
|
||||
{
|
||||
SQString(){}
|
||||
SQString() : _sharedstate(nullptr), _next(nullptr), _len(0), _hash(0)
|
||||
{
|
||||
_val[0] = 0;
|
||||
}
|
||||
~SQString(){}
|
||||
public:
|
||||
static SQString *Create(SQSharedState *ss, const SQChar *, SQInteger len = -1 );
|
||||
|
@ -18,7 +18,7 @@
|
||||
void sq_base_register(HSQUIRRELVM v);
|
||||
|
||||
struct SQExceptionTrap{
|
||||
SQExceptionTrap() {}
|
||||
SQExceptionTrap() : _stackbase(0), _stacksize(0), _ip(nullptr), _extarget(0) {}
|
||||
SQExceptionTrap(SQInteger ss, SQInteger stackbase,SQInstruction *ip, SQInteger ex_target){ _stacksize = ss; _stackbase = stackbase; _ip = ip; _extarget = ex_target;}
|
||||
SQInteger _stackbase;
|
||||
SQInteger _stacksize;
|
||||
|
Loading…
Reference in New Issue
Block a user