You've already forked godot
mirror of
https://github.com/godotengine/godot.git
synced 2025-11-05 12:10:55 +00:00
Cleanup of raw nullptr checks with Ref
Using `is_valid/null` over checks with `nullptr` or `ERR_FAIL_NULL` etc.
This commit is contained in:
@@ -4795,9 +4795,9 @@ String GDScriptParser::DataType::to_string() const {
|
||||
return class_type->fqcn;
|
||||
case SCRIPT: {
|
||||
if (is_meta_type) {
|
||||
return script_type != nullptr ? script_type->get_class_name().operator String() : "";
|
||||
return script_type.is_valid() ? script_type->get_class_name().operator String() : "";
|
||||
}
|
||||
String name = script_type != nullptr ? script_type->get_name() : "";
|
||||
String name = script_type.is_valid() ? script_type->get_name() : "";
|
||||
if (!name.is_empty()) {
|
||||
return name;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user