Remove unnecessary code and add some error explanations
This commit is contained in:
parent
eaaff9da31
commit
3c154eb93b
48 changed files with 149 additions and 187 deletions
|
|
@ -332,7 +332,7 @@ ScriptInstance *GDScript::instance_create(Object *p_this) {
|
|||
}
|
||||
|
||||
Variant::CallError unchecked_error;
|
||||
return _create_instance(NULL, 0, p_this, Object::cast_to<Reference>(p_this), unchecked_error);
|
||||
return _create_instance(NULL, 0, p_this, Object::cast_to<Reference>(p_this) != NULL, unchecked_error);
|
||||
}
|
||||
|
||||
PlaceHolderScriptInstance *GDScript::placeholder_instance_create(Object *p_this) {
|
||||
|
|
|
|||
|
|
@ -1259,8 +1259,6 @@ int GDScriptCompiler::_parse_expression(CodeGen &codegen, const GDScriptParser::
|
|||
ERR_FAIL_V(-1); //unreachable code
|
||||
} break;
|
||||
}
|
||||
|
||||
ERR_FAIL_V(-1); //unreachable code
|
||||
}
|
||||
|
||||
Error GDScriptCompiler::_parse_block(CodeGen &codegen, const GDScriptParser::BlockNode *p_block, int p_stack_level, int p_break_addr, int p_continue_addr) {
|
||||
|
|
|
|||
|
|
@ -2701,7 +2701,7 @@ ScriptInstance *CSharpScript::instance_create(Object *p_this) {
|
|||
}
|
||||
|
||||
Variant::CallError unchecked_error;
|
||||
return _create_instance(NULL, 0, p_this, Object::cast_to<Reference>(p_this), unchecked_error);
|
||||
return _create_instance(NULL, 0, p_this, Object::cast_to<Reference>(p_this) != NULL, unchecked_error);
|
||||
}
|
||||
|
||||
PlaceHolderScriptInstance *CSharpScript::placeholder_instance_create(Object *p_this) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue