Add a time info caching compatibility option #62

This is needed to get good performance out of SWAM Cello until this
issue is fixed by the plugin.
This commit is contained in:
Robbert van der Helm
2020-11-30 14:49:02 +01:00
parent e08162fabf
commit 23d5567e72
6 changed files with 64 additions and 3 deletions
+7 -1
View File
@@ -78,7 +78,13 @@ Configuration::Configuration(const fs::path& config_path,
// their defaults. At this point I'd really wish C++ could do pattern
// matching.
for (const auto& [key, value] : table) {
if (key == "editor_double_embed") {
if (key == "cache_time_info") {
if (const auto parsed_value = value.as_boolean()) {
cache_time_info = parsed_value->get();
} else {
invalid_options.push_back(key);
}
} else if (key == "editor_double_embed") {
if (const auto parsed_value = value.as_boolean()) {
editor_double_embed = parsed_value->get();
} else {