summaryrefslogtreecommitdiffstats
path: root/editor/editor_resource_preview.cpp
diff options
context:
space:
mode:
authorqarmin <mikrutrafal54@gmail.com>2019-07-10 11:54:12 +0200
committerqarmin <mikrutrafal54@gmail.com>2019-07-10 11:54:12 +0200
commit01cc7a996babc9173a393bf3dae080dc14a277c9 (patch)
treecc57520aebe056553aeb8999ef90f9c71cace392 /editor/editor_resource_preview.cpp
parent3bfffcc568d87342e867f95c35a4a19e09072189 (diff)
downloadredot-engine-01cc7a996babc9173a393bf3dae080dc14a277c9.tar.gz
Use reference to constant in functions
Diffstat (limited to 'editor/editor_resource_preview.cpp')
-rw-r--r--editor/editor_resource_preview.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/editor/editor_resource_preview.cpp b/editor/editor_resource_preview.cpp
index f2e4d1086b..327e61cea3 100644
--- a/editor/editor_resource_preview.cpp
+++ b/editor/editor_resource_preview.cpp
@@ -50,7 +50,7 @@ bool EditorResourcePreviewGenerator::handles(const String &p_type) const {
ERR_FAIL_V(false);
}
-Ref<Texture> EditorResourcePreviewGenerator::generate(const RES &p_from, const Size2 p_size) const {
+Ref<Texture> EditorResourcePreviewGenerator::generate(const RES &p_from, const Size2 &p_size) const {
if (get_script_instance() && get_script_instance()->has_method("generate")) {
return get_script_instance()->call("generate", p_from, p_size);
@@ -59,7 +59,7 @@ Ref<Texture> EditorResourcePreviewGenerator::generate(const RES &p_from, const S
ERR_FAIL_V(Ref<Texture>());
}
-Ref<Texture> EditorResourcePreviewGenerator::generate_from_path(const String &p_path, const Size2 p_size) const {
+Ref<Texture> EditorResourcePreviewGenerator::generate_from_path(const String &p_path, const Size2 &p_size) const {
if (get_script_instance() && get_script_instance()->has_method("generate_from_path")) {
return get_script_instance()->call("generate_from_path", p_path, p_size);