mirror of
https://github.com/godotengine/godot.git
synced 2026-01-03 18:11:19 +03:00
Use RequiredParam and RequiredResult in a handful of places in order to test
This commit is contained in:
@@ -97,8 +97,8 @@ void ResourceFormatSaver::_bind_methods() {
|
||||
GDVIRTUAL_BIND(_recognize_path, "resource", "path");
|
||||
}
|
||||
|
||||
Error ResourceSaver::save(const Ref<Resource> &p_resource, const String &p_path, uint32_t p_flags) {
|
||||
ERR_FAIL_COND_V_MSG(p_resource.is_null(), ERR_INVALID_PARAMETER, vformat("Can't save empty resource to path '%s'.", p_path));
|
||||
Error ResourceSaver::save(RequiredParam<Resource> rp_resource, const String &p_path, uint32_t p_flags) {
|
||||
EXTRACT_PARAM_OR_FAIL_V_MSG(p_resource, rp_resource, ERR_INVALID_PARAMETER, vformat("Can't save empty resource to path '%s'.", p_path));
|
||||
String path = p_path;
|
||||
if (path.is_empty()) {
|
||||
path = p_resource->get_path();
|
||||
|
||||
Reference in New Issue
Block a user