Skip to content

Commit

Permalink
Finishing changes for 3.2 update
Browse files Browse the repository at this point in the history
  • Loading branch information
mavsm committed Jan 30, 2020
1 parent f5cc1b1 commit ace5fa4
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 18 deletions.
10 changes: 2 additions & 8 deletions core/object.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1561,20 +1561,14 @@ void Object::_set_bind(const String &p_set, const Variant &p_value) {

bool valid = false;
set(p_set, p_value, &valid);
if (!valid) {
ERR_EXPLAIN("Cannot set property \"" + p_set + "\" in an instance of " + get_class_name());
ERR_FAIL();
}
ERR_FAIL_COND_MSG(!valid, "Cannot set property \"" + p_set + "\" in an instance of " + get_class_name())
}

Variant Object::_get_bind(const String &p_name) const {

bool valid = false;
Variant result = get(p_name, &valid);
if (!valid) {
ERR_EXPLAIN("Cannot get property \"" + p_name + "\" in an instance of " + get_class_name());
ERR_FAIL_V(Variant());
}
ERR_FAIL_COND_V_MSG(!valid, Variant(), "Cannot get property \"" + p_name + "\" in an instance of " + get_class_name())
return result;
}

Expand Down
5 changes: 1 addition & 4 deletions modules/gdscript/gdscript_function.h
Original file line number Diff line number Diff line change
Expand Up @@ -79,10 +79,7 @@ struct GDScriptDataType {

Object *obj = p_variant.operator Object *();
if (obj) {
if (!ObjectDB::instance_validate(obj)) {
ERR_EXPLAIN("Invalid object instance (already freed?)");
ERR_FAIL_V(false);
}
ERR_FAIL_COND_V_MSG(!ObjectDB::instance_validate(obj), false, "Invalid object instance (already freed?)");
if (!ClassDB::is_parent_class(obj->get_class_name(), native_type)) {
// Try with underscore prefix
StringName underscore_native_type = "_" + native_type;
Expand Down
7 changes: 1 addition & 6 deletions scene/gui/control.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -199,10 +199,6 @@ Size2 Control::get_combined_minimum_size() const {
return data.minimum_size_cache;
}

Size2 Control::_edit_get_minimum_size() const {

return get_combined_minimum_size();
}

#ifdef DEBUG_ENABLED

Expand All @@ -224,8 +220,7 @@ void Control::_draw_debug_area() {
break;
}
default: {
ERR_EXPLAIN("Invalid mouse filter");
ERR_FAIL();
ERR_FAIL_MSG("Invalid mouse filter");
}
}

Expand Down

0 comments on commit ace5fa4

Please sign in to comment.