MCPcopy Create free account
hub / github.com/N64Recomp/N64Recomp / get_toml_path_array

Function get_toml_path_array

RecompModTool/main.cpp:208–223  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

206}
207
208static 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
225bool validate_config_option(const toml::table& option) {
226 // TODO config option validation.

Callers 1

parse_mod_config_inputsFunction · 0.85

Calls 1

concat_if_not_emptyFunction · 0.70

Tested by

no test coverage detected