summaryrefslogtreecommitdiff
path: root/editor/editor_file_system.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'editor/editor_file_system.cpp')
-rw-r--r--editor/editor_file_system.cpp32
1 files changed, 16 insertions, 16 deletions
diff --git a/editor/editor_file_system.cpp b/editor/editor_file_system.cpp
index 9153640115..6f34c677db 100644
--- a/editor/editor_file_system.cpp
+++ b/editor/editor_file_system.cpp
@@ -919,11 +919,11 @@ void EditorFileSystem::_scan_new_dir(EditorFileSystemDirectory *p_dir, Ref<DirAc
for (int i = 0; i < ScriptServer::get_language_count(); i++) {
ScriptLanguage *lang = ScriptServer::get_language(i);
if (lang->supports_documentation() && fi->type == lang->get_type()) {
- Ref<Script> script = ResourceLoader::load(path);
- if (script == nullptr) {
+ Ref<Script> scr = ResourceLoader::load(path);
+ if (scr == nullptr) {
continue;
}
- Vector<DocData::ClassDoc> docs = script->get_documentation();
+ Vector<DocData::ClassDoc> docs = scr->get_documentation();
for (int j = 0; j < docs.size(); j++) {
EditorHelp::get_doc_data()->add_doc(docs[j]);
}
@@ -1902,8 +1902,8 @@ void EditorFileSystem::_reimport_file(const String &p_file, const HashMap<String
List<String> import_variants;
List<String> gen_files;
- Variant metadata;
- Error err = importer->import(p_file, base_path, params, &import_variants, &gen_files, &metadata);
+ Variant meta;
+ Error err = importer->import(p_file, base_path, params, &import_variants, &gen_files, &meta);
if (err != OK) {
ERR_PRINT("Error importing '" + p_file + "'.");
@@ -1955,8 +1955,8 @@ void EditorFileSystem::_reimport_file(const String &p_file, const HashMap<String
f->store_line("valid=false");
}
- if (metadata != Variant()) {
- f->store_line("metadata=" + metadata.get_construct_string());
+ if (meta != Variant()) {
+ f->store_line("metadata=" + meta.get_construct_string());
}
f->store_line("");
@@ -2108,11 +2108,11 @@ void EditorFileSystem::reimport_files(const Vector<String> &p_files) {
reimport_files.sort();
- bool use_threads = GLOBAL_GET("editor/import/use_multiple_threads");
+ bool use_multiple_threads = GLOBAL_GET("editor/import/use_multiple_threads");
int from = 0;
for (int i = 0; i < reimport_files.size(); i++) {
- if (use_threads && reimport_files[i].threaded) {
+ if (use_multiple_threads && reimport_files[i].threaded) {
if (i + 1 == reimport_files.size() || reimport_files[i + 1].importer != reimport_files[from].importer) {
if (from - i == 0) {
//single file, do not use threads
@@ -2124,16 +2124,16 @@ void EditorFileSystem::reimport_files(const Vector<String> &p_files) {
importer->import_threaded_begin();
- ImportThreadData data;
- data.max_index = from;
- data.reimport_from = from;
- data.reimport_files = reimport_files.ptr();
+ ImportThreadData tdata;
+ tdata.max_index = from;
+ tdata.reimport_from = from;
+ tdata.reimport_files = reimport_files.ptr();
- WorkerThreadPool::GroupID group_task = WorkerThreadPool::get_singleton()->add_template_group_task(this, &EditorFileSystem::_reimport_thread, &data, i - from + 1, -1, false, vformat(TTR("Import resources of type: %s"), reimport_files[from].importer));
+ WorkerThreadPool::GroupID group_task = WorkerThreadPool::get_singleton()->add_template_group_task(this, &EditorFileSystem::_reimport_thread, &tdata, i - from + 1, -1, false, vformat(TTR("Import resources of type: %s"), reimport_files[from].importer));
int current_index = from - 1;
do {
- if (current_index < data.max_index) {
- current_index = data.max_index;
+ if (current_index < tdata.max_index) {
+ current_index = tdata.max_index;
pr.step(reimport_files[current_index].path.get_file(), current_index);
}
OS::get_singleton()->delay_usec(1);