| 206 | } |
| 207 | |
| 208 | static std::vector<std::filesystem::path> get_toml_path_array(const toml::array& toml_array, const std::filesystem::path& basedir) { |
| 209 | std::vector<std::filesystem::path> ret; |
| 210 | |
| 211 | // Reserve room for all the funcs in the map. |
| 212 | ret.reserve(toml_array.size()); |
| 213 | toml_array.for_each([&ret, &basedir](auto&& el) { |
| 214 | if constexpr (toml::is_string<decltype(el)>) { |
| 215 | ret.emplace_back(concat_if_not_empty(basedir, el.template ref<std::string>())); |
| 216 | } |
| 217 | else { |
| 218 | throw toml::parse_error("Invalid type for file entry", el.source()); |
| 219 | } |
| 220 | }); |
| 221 | |
| 222 | return ret; |
| 223 | } |
| 224 | |
| 225 | bool validate_config_option(const toml::table& option) { |
| 226 | // TODO config option validation. |
no test coverage detected