Skip to content

Commit 1ce6df7

Browse files
committed
Merge pull request godotengine#92871 from KoBeWi/execute_order
Remove unused order variable from EditorResourcePreview
2 parents 19affb6 + 20d67aa commit 1ce6df7

File tree

2 files changed

+0
-7
lines changed

2 files changed

+0
-7
lines changed

editor/editor_resource_preview.cpp

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -138,7 +138,6 @@ void EditorResourcePreview::_preview_ready(const String &p_path, int p_hash, con
138138
}
139139

140140
Item item;
141-
item.order = order++;
142141
item.preview = p_texture;
143142
item.small_preview = p_small_texture;
144143
item.last_hash = p_hash;
@@ -412,7 +411,6 @@ void EditorResourcePreview::queue_edited_resource_preview(const Ref<Resource> &p
412411
String path_id = "ID:" + itos(p_res->get_instance_id());
413412

414413
if (cache.has(path_id) && cache[path_id].last_hash == p_res->hash_edited_version_for_preview()) {
415-
cache[path_id].order = order++;
416414
p_receiver->call(p_receiver_func, path_id, cache[path_id].preview, cache[path_id].small_preview, p_userdata);
417415
return;
418416
}
@@ -439,7 +437,6 @@ void EditorResourcePreview::queue_resource_preview(const String &p_path, Object
439437
MutexLock lock(preview_mutex);
440438

441439
if (cache.has(p_path)) {
442-
cache[p_path].order = order++;
443440
p_receiver->call(p_receiver_func, p_path, cache[p_path].preview, cache[p_path].small_preview, p_userdata);
444441
return;
445442
}
@@ -533,7 +530,6 @@ void EditorResourcePreview::stop() {
533530

534531
EditorResourcePreview::EditorResourcePreview() {
535532
singleton = this;
536-
order = 0;
537533
}
538534

539535
EditorResourcePreview::~EditorResourcePreview() {

editor/editor_resource_preview.h

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -99,13 +99,10 @@ class EditorResourcePreview : public Node {
9999
Ref<Texture2D> preview;
100100
Ref<Texture2D> small_preview;
101101
Dictionary preview_metadata;
102-
int order = 0;
103102
uint32_t last_hash = 0;
104103
uint64_t modified_time = 0;
105104
};
106105

107-
int order;
108-
109106
HashMap<String, Item> cache;
110107

111108
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);

0 commit comments

Comments
 (0)