summaryrefslogtreecommitdiff
path: root/drivers/png/resource_saver_png.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/png/resource_saver_png.cpp')
-rw-r--r--drivers/png/resource_saver_png.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/drivers/png/resource_saver_png.cpp b/drivers/png/resource_saver_png.cpp
index 8633d2dc4e..704ddca726 100644
--- a/drivers/png/resource_saver_png.cpp
+++ b/drivers/png/resource_saver_png.cpp
@@ -35,7 +35,7 @@
#include "drivers/png/png_driver_common.h"
#include "scene/resources/texture.h"
-Error ResourceSaverPNG::save(const String &p_path, const RES &p_resource, uint32_t p_flags) {
+Error ResourceSaverPNG::save(const String &p_path, const Ref<Resource> &p_resource, uint32_t p_flags) {
Ref<ImageTexture> texture = p_resource;
ERR_FAIL_COND_V_MSG(!texture.is_valid(), ERR_INVALID_PARAMETER, "Can't save invalid texture as PNG.");
@@ -72,11 +72,11 @@ Vector<uint8_t> ResourceSaverPNG::save_image_to_buffer(const Ref<Image> &p_img)
return buffer;
}
-bool ResourceSaverPNG::recognize(const RES &p_resource) const {
+bool ResourceSaverPNG::recognize(const Ref<Resource> &p_resource) const {
return (p_resource.is_valid() && p_resource->is_class("ImageTexture"));
}
-void ResourceSaverPNG::get_recognized_extensions(const RES &p_resource, List<String> *p_extensions) const {
+void ResourceSaverPNG::get_recognized_extensions(const Ref<Resource> &p_resource, List<String> *p_extensions) const {
if (Object::cast_to<ImageTexture>(*p_resource)) {
p_extensions->push_back("png");
}