Merge pull request #99765 from dalexeev/core-fix-json-from-to-native
Core: Fix `JSON.{from,to}_native()` issues
This commit is contained in:
@ -112,14 +112,12 @@ bool EditorAutoloadSettings::_autoload_name_is_valid(const String &p_name, Strin
|
||||
return false;
|
||||
}
|
||||
|
||||
for (int i = 0; i < Variant::VARIANT_MAX; i++) {
|
||||
if (Variant::get_type_name(Variant::Type(i)) == p_name) {
|
||||
if (r_error) {
|
||||
*r_error = TTR("Invalid name.") + " " + TTR("Must not collide with an existing built-in type name.");
|
||||
}
|
||||
|
||||
return false;
|
||||
if (Variant::get_type_by_name(p_name) < Variant::VARIANT_MAX) {
|
||||
if (r_error) {
|
||||
*r_error = TTR("Invalid name.") + " " + TTR("Must not collide with an existing built-in type name.");
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
for (int i = 0; i < CoreConstants::get_global_constant_count(); i++) {
|
||||
|
||||
Reference in New Issue
Block a user