Core: Add [[nodiscard]] to string-like classes

This commit is contained in:
Thaddeus Crews 2024-06-23 12:28:04 -05:00
parent 6a6a1168a5
commit 579feb387c
No known key found for this signature in database
GPG key ID: 8C6E5FEB5FC03CCC
12 changed files with 22 additions and 21 deletions

View file

@ -59,7 +59,8 @@ static String _get_parent_class_of_script(const String &p_path) {
// Inherits from a built-in class.
if (base.is_null()) {
script->get_language()->get_global_class_name(script->get_path(), &class_name);
// We only care about the referenced class_name.
_ALLOW_DISCARD_ script->get_language()->get_global_class_name(script->get_path(), &class_name);
return class_name;
}