浏览代码

Merge pull request #92871 from KoBeWi/execute_order

Remove unused order variable from EditorResourcePreview
Rémi Verschelde 1 年之前
父节点
当前提交
1ce6df7087
共有 2 个文件被更改,包括 0 次插入7 次删除
  1. 0 4
      editor/editor_resource_preview.cpp
  2. 0 3
      editor/editor_resource_preview.h

+ 0 - 4
editor/editor_resource_preview.cpp

@@ -138,7 +138,6 @@ void EditorResourcePreview::_preview_ready(const String &p_path, int p_hash, con
 		}
 		}
 
 
 		Item item;
 		Item item;
-		item.order = order++;
 		item.preview = p_texture;
 		item.preview = p_texture;
 		item.small_preview = p_small_texture;
 		item.small_preview = p_small_texture;
 		item.last_hash = p_hash;
 		item.last_hash = p_hash;
@@ -412,7 +411,6 @@ void EditorResourcePreview::queue_edited_resource_preview(const Ref<Resource> &p
 		String path_id = "ID:" + itos(p_res->get_instance_id());
 		String path_id = "ID:" + itos(p_res->get_instance_id());
 
 
 		if (cache.has(path_id) && cache[path_id].last_hash == p_res->hash_edited_version_for_preview()) {
 		if (cache.has(path_id) && cache[path_id].last_hash == p_res->hash_edited_version_for_preview()) {
-			cache[path_id].order = order++;
 			p_receiver->call(p_receiver_func, path_id, cache[path_id].preview, cache[path_id].small_preview, p_userdata);
 			p_receiver->call(p_receiver_func, path_id, cache[path_id].preview, cache[path_id].small_preview, p_userdata);
 			return;
 			return;
 		}
 		}
@@ -439,7 +437,6 @@ void EditorResourcePreview::queue_resource_preview(const String &p_path, Object
 		MutexLock lock(preview_mutex);
 		MutexLock lock(preview_mutex);
 
 
 		if (cache.has(p_path)) {
 		if (cache.has(p_path)) {
-			cache[p_path].order = order++;
 			p_receiver->call(p_receiver_func, p_path, cache[p_path].preview, cache[p_path].small_preview, p_userdata);
 			p_receiver->call(p_receiver_func, p_path, cache[p_path].preview, cache[p_path].small_preview, p_userdata);
 			return;
 			return;
 		}
 		}
@@ -533,7 +530,6 @@ void EditorResourcePreview::stop() {
 
 
 EditorResourcePreview::EditorResourcePreview() {
 EditorResourcePreview::EditorResourcePreview() {
 	singleton = this;
 	singleton = this;
-	order = 0;
 }
 }
 
 
 EditorResourcePreview::~EditorResourcePreview() {
 EditorResourcePreview::~EditorResourcePreview() {

+ 0 - 3
editor/editor_resource_preview.h

@@ -99,13 +99,10 @@ class EditorResourcePreview : public Node {
 		Ref<Texture2D> preview;
 		Ref<Texture2D> preview;
 		Ref<Texture2D> small_preview;
 		Ref<Texture2D> small_preview;
 		Dictionary preview_metadata;
 		Dictionary preview_metadata;
-		int order = 0;
 		uint32_t last_hash = 0;
 		uint32_t last_hash = 0;
 		uint64_t modified_time = 0;
 		uint64_t modified_time = 0;
 	};
 	};
 
 
-	int order;
-
 	HashMap<String, Item> cache;
 	HashMap<String, Item> cache;
 
 
 	void _preview_ready(const String &p_path, int p_hash, const Ref<Texture2D> &p_texture, const Ref<Texture2D> &p_small_texture, ObjectID id, const StringName &p_func, const Variant &p_ud, const Dictionary &p_metadata);
 	void _preview_ready(const String &p_path, int p_hash, const Ref<Texture2D> &p_texture, const Ref<Texture2D> &p_small_texture, ObjectID id, const StringName &p_func, const Variant &p_ud, const Dictionary &p_metadata);