Merge pull request #97817 from bruvzg/prop_warn_remove

Partially revert #96780, remove warnings from project/editor settings `_get`.
This commit is contained in:
Rémi Verschelde 2024-10-04 22:43:56 +02:00
commit aaffffcd43
No known key found for this signature in database
GPG Key ID: C3336907360768E1
4 changed files with 54 additions and 62 deletions

View File

@ -348,7 +348,6 @@ bool ProjectSettings::_get(const StringName &p_name, Variant &r_ret) const {
_THREAD_SAFE_METHOD_
if (!props.has(p_name)) {
WARN_PRINT("Property not found: " + String(p_name));
return false;
}
r_ret = props[p_name].variant;

View File

@ -845,7 +845,6 @@ Error ResourceLoaderBinary::load() {
}
}
if (ClassDB::has_property(res->get_class_name(), name)) {
if (value.get_type() == Variant::ARRAY) {
Array set_array = value;
bool is_get_valid = false;
@ -870,7 +869,6 @@ Error ResourceLoaderBinary::load() {
}
}
}
}
if (set_valid) {
res->set(name, value);

View File

@ -221,7 +221,6 @@ bool EditorSettings::_get(const StringName &p_name, Variant &r_ret) const {
const VariantContainer *v = props.getptr(p_name);
if (!v) {
WARN_PRINT("EditorSettings::_get - Property not found: " + String(p_name));
return false;
}
r_ret = v->variant;

View File

@ -612,7 +612,6 @@ Error ResourceLoaderText::load() {
}
}
if (ClassDB::has_property(res->get_class_name(), assign)) {
if (value.get_type() == Variant::ARRAY) {
Array set_array = value;
bool is_get_valid = false;
@ -637,7 +636,6 @@ Error ResourceLoaderText::load() {
}
}
}
}
if (set_valid) {
res->set(assign, value);
@ -754,7 +752,6 @@ Error ResourceLoaderText::load() {
}
}
if (ClassDB::has_property(resource->get_class_name(), assign)) {
if (value.get_type() == Variant::ARRAY) {
Array set_array = value;
bool is_get_valid = false;
@ -779,7 +776,6 @@ Error ResourceLoaderText::load() {
}
}
}
}
if (set_valid) {
resource->set(assign, value);