diff options
Diffstat (limited to 'core/io')
-rw-r--r-- | core/io/resource_loader.cpp | 3 | ||||
-rw-r--r-- | core/io/resource_saver.cpp | 3 |
2 files changed, 2 insertions, 4 deletions
diff --git a/core/io/resource_loader.cpp b/core/io/resource_loader.cpp index a29b9d1ddb..35af58ad07 100644 --- a/core/io/resource_loader.cpp +++ b/core/io/resource_loader.cpp @@ -940,8 +940,7 @@ bool ResourceLoader::add_custom_resource_format_loader(String script_path) { ERR_EXPLAIN("Cannot instance script as custom resource loader, expected 'ResourceFormatLoader' inheritance, got: " + String(ibt)); ERR_FAIL_COND_V(obj == NULL, false); - ResourceFormatLoader *crl = NULL; - crl = Object::cast_to<ResourceFormatLoader>(obj); + ResourceFormatLoader *crl = Object::cast_to<ResourceFormatLoader>(obj); crl->set_script(s.get_ref_ptr()); ResourceLoader::add_resource_format_loader(crl); diff --git a/core/io/resource_saver.cpp b/core/io/resource_saver.cpp index e2c1c3402a..369cd93442 100644 --- a/core/io/resource_saver.cpp +++ b/core/io/resource_saver.cpp @@ -222,8 +222,7 @@ bool ResourceSaver::add_custom_resource_format_saver(String script_path) { ERR_EXPLAIN("Cannot instance script as custom resource saver, expected 'ResourceFormatSaver' inheritance, got: " + String(ibt)); ERR_FAIL_COND_V(obj == NULL, false); - ResourceFormatSaver *crl = NULL; - crl = Object::cast_to<ResourceFormatSaver>(obj); + ResourceFormatSaver *crl = Object::cast_to<ResourceFormatSaver>(obj); crl->set_script(s.get_ref_ptr()); ResourceSaver::add_resource_format_saver(crl); |