Merge pull request #70 from dut-lang/issue_69

Fixed code style, remove the warning from gcc
This commit is contained in:
Alberto Demichelis 2016-08-20 20:39:26 +08:00 committed by GitHub
commit cfd4df6988

View File

@ -971,7 +971,11 @@ SQRESULT sq_setdelegate(HSQUIRRELVM v,SQInteger idx)
switch(type) { switch(type) {
case OT_TABLE: case OT_TABLE:
if(type(mt) == OT_TABLE) { if(type(mt) == OT_TABLE) {
if(!_table(self)->SetDelegate(_table(mt))) return sq_throwerror(v, _SC("delagate cycle")); v->Pop();} if(!_table(self)->SetDelegate(_table(mt))) {
return sq_throwerror(v, _SC("delagate cycle"));
}
v->Pop();
}
else if(type(mt)==OT_NULL) { else if(type(mt)==OT_NULL) {
_table(self)->SetDelegate(NULL); v->Pop(); } _table(self)->SetDelegate(NULL); v->Pop(); }
else return sq_aux_invalidtype(v,type); else return sq_aux_invalidtype(v,type);