From 1c14da32732e8e0473f8650286deff10f394d0ac Mon Sep 17 00:00:00 2001 From: volzhs Date: Tue, 29 Jan 2019 02:55:13 +0900 Subject: [PATCH] Remove unnecessary call VS::get_singleton() twice --- editor/plugins/editor_preview_plugins.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/editor/plugins/editor_preview_plugins.cpp b/editor/plugins/editor_preview_plugins.cpp index 4556b11708b..0c0cc9d635c 100644 --- a/editor/plugins/editor_preview_plugins.cpp +++ b/editor/plugins/editor_preview_plugins.cpp @@ -334,7 +334,7 @@ Ref EditorMaterialPreviewPlugin::generate(const RES &p_from, const Size OS::get_singleton()->delay_usec(10); } - Ref img = VS::get_singleton()->VS::get_singleton()->texture_get_data(viewport_texture); + Ref img = VS::get_singleton()->texture_get_data(viewport_texture); VS::get_singleton()->mesh_surface_set_material(sphere, 0, RID()); ERR_FAIL_COND_V(!img.is_valid(), Ref()); @@ -734,7 +734,7 @@ Ref EditorMeshPreviewPlugin::generate(const RES &p_from, const Size2 p_ OS::get_singleton()->delay_usec(10); } - Ref img = VS::get_singleton()->VS::get_singleton()->texture_get_data(viewport_texture); + Ref img = VS::get_singleton()->texture_get_data(viewport_texture); ERR_FAIL_COND_V(img.is_null(), Ref()); VS::get_singleton()->instance_set_base(mesh_instance, RID()); @@ -854,7 +854,7 @@ Ref EditorFontPreviewPlugin::generate_from_path(const String &p_path, c OS::get_singleton()->delay_usec(10); } - Ref img = VS::get_singleton()->VS::get_singleton()->texture_get_data(viewport_texture); + Ref img = VS::get_singleton()->texture_get_data(viewport_texture); ERR_FAIL_COND_V(img.is_null(), Ref()); img->convert(Image::FORMAT_RGBA8);