mirror of
https://github.com/izzy2lost/Torch.git
synced 2026-07-06 00:18:35 -07:00
Fixed performance on modding factories
This commit is contained in:
+7
-7
@@ -134,7 +134,6 @@ void Companion::ParseEnums(std::string& header) {
|
||||
enumIndex++;
|
||||
this->gEnums[enumName][enumIndex] = line;
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
@@ -159,8 +158,15 @@ void Companion::ExtractNode(YAML::Node& node, std::string& name, SWrapper* binar
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
auto impl = factory->get();
|
||||
|
||||
auto exporter = impl->GetExporter(this->gConfig.exporterType);
|
||||
if(!exporter.has_value()){
|
||||
SPDLOG_WARN("No exporter found for {}", name);
|
||||
return;
|
||||
}
|
||||
|
||||
std::optional<std::shared_ptr<IParsedData>> result;
|
||||
if(this->gConfig.modding) {
|
||||
if(impl->SupportModdedAssets() && this->gModdedAssetPaths.contains(name)) {
|
||||
@@ -187,12 +193,6 @@ void Companion::ExtractNode(YAML::Node& node, std::string& name, SWrapper* binar
|
||||
return;
|
||||
}
|
||||
|
||||
auto exporter = factory->get()->GetExporter(this->gConfig.exporterType);
|
||||
if(!exporter.has_value()){
|
||||
SPDLOG_WARN("No exporter found for {}", name);
|
||||
return;
|
||||
}
|
||||
|
||||
for (auto [fst, snd] : this->gAssetDependencies[this->gCurrentFile]) {
|
||||
if(snd.second) {
|
||||
continue;
|
||||
|
||||
Reference in New Issue
Block a user