Add shorthand for using singleton string names

This commit is contained in:
kobewi 2023-09-04 17:01:33 +02:00
parent 916ea002c1
commit a262d2d881
77 changed files with 382 additions and 380 deletions

View file

@ -2121,7 +2121,7 @@ Variant::operator ::RID() const {
}
#endif
Callable::CallError ce;
Variant ret = _get_obj().obj->callp(CoreStringNames::get_singleton()->get_rid, nullptr, 0, ce);
Variant ret = _get_obj().obj->callp(CoreStringName(get_rid), nullptr, 0, ce);
if (ce.error == Callable::CallError::CALL_OK && ret.get_type() == Variant::RID) {
return ret;
}