Fix ResourceLoader's load method signature.

This commit is contained in:
Relintai 2023-06-11 18:15:48 +02:00
parent 1a9a5d522c
commit 37ac19fe0b
3 changed files with 4 additions and 4 deletions

View File

@ -3397,7 +3397,7 @@ void CSharpScript::get_members(RBSet<StringName> *p_members) {
/*************** RESOURCE ***************/
RES ResourceFormatLoaderCSharpScript::load(const String &p_path, const String &p_original_path, Error *r_error, bool p_no_subresource_cache) {
RES ResourceFormatLoaderCSharpScript::load(const String &p_path, const String &p_original_path, Error *r_error) {
if (r_error)
*r_error = ERR_FILE_CANT_OPEN;

View File

@ -482,7 +482,7 @@ public:
class ResourceFormatLoaderCSharpScript : public ResourceFormatLoader {
public:
virtual RES load(const String &p_path, const String &p_original_path = "", Error *r_error = NULL, bool p_no_subresource_cache = false);
virtual RES load(const String &p_path, const String &p_original_path = "", Error *r_error = NULL);
virtual void get_recognized_extensions(List<String> *p_extensions) const;
virtual bool handles_type(const String &p_type) const;
virtual String get_resource_type(const String &p_path) const;

View File

@ -22,9 +22,9 @@ namespace Godot
/// Thrown when the given the loaded resource can't be casted to the given type <typeparamref name="T"/>.
/// </exception>
/// <typeparam name="T">The type to cast to. Should be a descendant of <see cref="Resource"/>.</typeparam>
public static T Load<T>(string path, string typeHint = null, bool noCache = false) where T : class
public static T Load<T>(string path, string typeHint = null) where T : class
{
return (T)(object)Load(path, typeHint, noCache);
return (T)(object)Load(path, typeHint);
}
}
}