summaryrefslogtreecommitdiffhomepage
path: root/plugin.cpp
diff options
context:
space:
mode:
authorRoland Reichwein <mail@reichwein.it>2020-05-15 18:59:19 +0200
committerRoland Reichwein <mail@reichwein.it>2020-05-15 18:59:19 +0200
commit48908fb0bba69404dfd86d1af3b9ace1e0d598c9 (patch)
treee8b60f5dcb692d1840e9c948b92689c1c3c0c284 /plugin.cpp
parent2a3c27aadee91cd7b179e762ef0fe99128345bd1 (diff)
Speedup GetPath()
Diffstat (limited to 'plugin.cpp')
-rw-r--r--plugin.cpp7
1 files changed, 4 insertions, 3 deletions
diff --git a/plugin.cpp b/plugin.cpp
index 28fdb62..afcbdb3 100644
--- a/plugin.cpp
+++ b/plugin.cpp
@@ -64,22 +64,23 @@ void PluginLoader::load_plugins()
}
}
+// validate config regarding plugins
bool PluginLoader::validate_config()
{
const auto& sites{m_config.Sites()};
for (const auto& site: sites) {
- for (const auto& path: site.paths) {
+ for (const auto& path: site.second.paths) {
// path must contain target and plugin
auto it {path.params.find("target")};
if (it == path.params.end()) {
- std::cout << "Path " << path.requested << " for site " << site.name << " is missing target specification." << std::endl;
+ std::cout << "Path " << path.requested << " for site " << site.first << " is missing target specification." << std::endl;
return false;
}
it = path.params.find("plugin");
if (it == path.params.end()) {
- std::cout << "Path " << path.requested << " for site " << site.name << " is missing plugin specification." << std::endl;
+ std::cout << "Path " << path.requested << " for site " << site.first << " is missing plugin specification." << std::endl;
return false;
}